Commit Graph

289 Commits

Author SHA1 Message Date
gavrila florin
fa71d7a37a add support for own ids 2022-05-04 00:04:38 +03:00
Xing
d36dcb7fc2
Merge pull request #94 from cameronpm/client_race
Fix two race conditions in client.Do
2021-05-03 16:56:33 +12:00
Paul Cameron
a8f0a04c3d Fix two race conditions in client.Do
* Common race condition is fixed by identifying that Client.respHandler
  can be completely removed since all respHandler operations (get, put
  and invocation) can be moved into the Client.processLoop goroutine,
  meaning that zero locking is required. This race condition resulted
  in a deadlock that was resolved by the response timeout at the
  end of client.Do, returning ErrLostConn

* Rare race condition is fixed by changing responseHandlerMap.get
  to .getAndRemove. This race condition resulted in the innerHandler
  for a new dtJobCreated assigned in client.Do overriding a stale older
  dtJobCreated request, and the newer innerHandler being removed by an
  older dtJobCreated in client.processLoop > client.handleInner. When
  the newer dtJobCreated response was received, the handler for it had
  already been deleted. This was resolved by the response timeout at the
  end of client.Do, returning ErrLostConn
2021-05-02 11:31:19 +10:00
galih rivanto
81d00aa9ce add synchronization to prevent race condition on worker shutdown (#89)
* add synchronization to prevent race condition on worker shutdown

* fix incorrect synchronization and add race unit test

* fix race while broadcasting outpack
2019-05-28 18:41:20 +08:00
Christoffer Fjellström
b902646ce8
Merge pull request #87 from CodeLingoBot/rewrite
Fix function comments based on best practices from Effective Go
2019-02-28 11:28:24 +01:00
CodeLingo Bot
133dd3716f Fix function comments based on best practices from Effective Go
Signed-off-by: CodeLingo Bot <bot@codelingo.io>
2019-02-28 02:11:17 +00:00
Christoffer Fjellström
f333ba6102 Fix job register with timeout set
Fixed issue where timeout is sent as binary encoded uint but server
expects a string
2019-02-13 11:45:35 +01:00
Md. Ashiquzzaman
d0e6ec4878 Fix Odd use of time.Duration (#29)
Ref - https://github.com/appscode/g2/issues/28
2018-11-21 17:16:29 +01:00
Sadlil Rhythom
f2f0349d2d Remove lastcall. 2018-11-21 17:00:42 +01:00
Sadlil Rhythom
5c665de2d6 fix worker reconnect errors, send cando after reconnection.
* fix worker reconnect errors, send cando after reconnection.
2018-11-19 17:10:05 +01:00
Christoffer Fjellström
2fba865e37 Merge pull request #81 from Detectify/master
Fix race condition in client.Do()
2017-10-18 14:34:29 +02:00
Christoffer Fjellström
0ca6dc2c6f Remove duplicate locking
Fixes duplicated code after merge
2017-09-30 09:30:29 +02:00
No-ops
7b6215604e Merge remote-tracking branch 'upstream/master' 2017-09-29 10:51:16 +02:00
No-ops
8a7ac5b450 Merge branch 'develop' 2017-09-27 16:57:19 +02:00
No-ops
a2eb7ba410 Remove unused imports 2017-09-27 16:57:03 +02:00
No-ops
53bb686b76 Merge branch 'develop' 2017-09-27 16:51:18 +02:00
Christoffer Fjellström
e701107e40 Remove broken test suite
OS and configuration specific integration test
2017-09-27 16:42:48 +02:00
Christoffer Fjellström
99d317427f Add skipping for integration tests when running unit tests
Run integration tests with the -integration flag
2017-09-27 16:42:21 +02:00
Sadlil Rhythom
d8cb3883ad Merge pull request #79 from John-Lin/fixed-typo
fixed typo on WorkComplete
2017-09-27 16:59:04 +06:00
Christoffer Fjellström
d9ad23413d Merge pull request #1 from Detectify/develop
Add lock on job handler assignment
2017-09-27 12:00:00 +02:00
Christoffer Fjellström
2dbf199260 Add lock on job handler assignment
Fixes race condition on jobs being done before handler is set.
2017-09-27 11:57:57 +02:00
John-Lin
e1224a8c20 fixed typo and keep WorkComplate for downward compatibility 2017-09-27 13:19:08 +08:00
Christoffer Fjellström
9735b2e54f Merge pull request #75 from No-ops/patch-1
Add sync lock to create job functions
2017-03-02 13:40:41 +01:00
Christoffer Fjellström
27942f55cd Add sync lock on do() to avoid race conditions when creating jobs 2017-02-03 10:06:27 +01:00
Christoffer Fjellström
d6791e2e42 Add sync lock to create job functions
Add sync lock to make create job calls thread safe.
2017-01-16 16:44:48 +01:00
Xing
b79fee2965 Merge pull request #70 from JessonChan/master
concurrent map bug fixed #70
2016-05-06 22:33:03 +12:00
JessonChan
dd82e211a3 concurrent map bug fixed 2016-05-06 18:00:58 +08:00
Xing
68777318f9 Merge pull request #65 from JessonChan/master
fixed #65
2016-04-24 11:03:26 +12:00
JessonChan
99c8032384 fix a bug when high qps 2016-04-20 12:54:21 +08:00
Xing
21cc8de64f Merge pull request #63 from kujohn/pool-custom-handler
Allow built in selectionHandlers to be reused outside of package
2015-12-14 18:41:29 +08:00
John Ku
9d99accce2 Allow built in selectionHandlers to be reused outside of package 2015-12-11 13:48:02 -08:00
Xing
6d9b2fba51 Merge pull request #62 from kujohn/pool-custom-handler
Export SelectionHandler
2015-12-11 12:44:35 +08:00
John Ku
1c4b8aa000 Export pool.clients for custom Pool instantiation 2015-12-10 13:54:48 -08:00
John Ku
d20c3c7bd1 Allow custom Pool without constructor 2015-12-10 11:19:04 -08:00
Xing Xing
c6c6c9cac2 don't use sigillum 2015-07-10 20:30:35 +08:00
Xing
503d523dbf Merge pull request #60 from micmac/master
Replace mutex in client.do() with a channel to avoid deadlock and int…
2015-07-10 20:24:16 +08:00
Endre Hirling
c615e74af8 Replace mutex in client.do() with a channel to avoid deadlock and introduce command timeout 2015-07-06 21:40:49 +02:00
Xing Xing
df1af4f8cb 80 chars/line 2015-01-20 10:28:36 +08:00
Xing Xing
b612b80f80 complete the list of contributors 2015-01-20 10:27:12 +08:00
Xing Xing
2c9d82830c merge, update README to the newest API design. 2015-01-20 09:43:54 +08:00
C.R. Kirkwood-Watts
37db439a4a Update README.md
Updated to reflect new type names.
2015-01-19 10:28:21 -08:00
Xing Xing
bc80b2f853 fixed signal method 2015-01-16 17:41:19 +08:00
Xing Xing
939189448e golib/signal upgrade 2015-01-15 10:28:21 +08:00
Xing Xing
9dbb3ea3fc added lock-write to co-ordinate package sequence #56 2015-01-15 10:26:53 +08:00
Xing Xing
c01a2e22c0 upgrade travis to Go 1.4 2015-01-10 00:09:38 +08:00
Xing Xing
ad9b3cb988 go fmt 2015-01-06 11:45:18 +08:00
Xing Xing
a003eac543 fixed the closing method 2015-01-06 11:34:39 +08:00
Xing Xing
d32eb195e1 Merge branch 'kdar-big-data' 2014-12-10 09:14:08 +08:00
Xing Xing
25735c8488 merge for issue #33 2014-12-10 09:13:49 +08:00
Xing
ea92c122a5 Merge pull request #50 from AzuraMeta/patch-1
Fixed WORK_FAIL needing 2 arguments
2014-08-21 16:32:24 +08:00