Fix Invocation Service group lost handling#816
Conversation
…ld return if the invocation service is stopped.
Codecov Report
@@ Coverage Diff @@
## master #816 +/- ##
==========================================
- Coverage 77.13% 77.11% -0.02%
==========================================
Files 329 329
Lines 15547 15556 +9
==========================================
+ Hits 11992 11996 +4
- Misses 2709 2713 +4
- Partials 846 847 +1
Continue to review full report at Codecov.
|
utku-caglayan
left a comment
There was a problem hiding this comment.
I think this works and understand the reasoning behind adding the doneChannel control. But I do not get replacing the atomic variable with a mutex-protected one. Can you share your reasoning on that one?
Atomic variable can protect only itself. They can be used to protect a block when used with compare and swap, but otherwise a mutex should be used. Line is not enough to protect the block below, since invocation service can stopped right after that if statement. |
There was a problem hiding this comment.
LGTM! Just a quick remark,s.executor.stop() use a waitgroup inside it. In case of any unintended infinite spinning on wait creates a deadlock on the invocation service state mutex.
https://github.com/hazelcast/hazelcast-go-client/blob/master/internal/invocation/stripe_executor.go#L80
Fixed invocation service's group lost event handling (cherry picked from commit a5c2607)
* Fix all partitions being assigned to one node (#775) Fix all partitions getting mapped to one node (cherry picked from commit ec11592) * Fix go tools version so that it works with go 1.15 (#792) (cherry picked from commit dc17db9) * [Backports] Fixes SQL driver test to work with SSL * Fix SQL leak (#795) * Fixes SQL goroutine leak. (cherry picked from commit c10fdf4) * Fix Failover SSL (#797) Fixes the connection manager not using failover cluster settings for SSL (cherry picked from commit 989e683) * [Backports] Fix uptime gauge [API-1382] (#808) * Fix Invocation Service group lost handling (#816) Fixed invocation service's group lost event handling (cherry picked from commit a5c2607) * Remove MakeSubscriptionID method (#815) Removed MakeSubscriptionID method (cherry picked from commit d5fc815) * Renamed proto.EntrySizeInBytes and removed dead code (#814) (cherry picked from commit f06827c) * add missing API usage (#776) (cherry picked from commit c5e35ff) * update client version * fix for client version test Co-authored-by: Alex Barkan <aleckz@gmail.com> Co-authored-by: Serkan Özel <serkan.ozel@hazelcast.com> Co-authored-by: Yüce Tekol <yuce.tekol@hazelcast.com>
Fixed invocation service's group lost event handling
This PR fixes group lost event handling in the Invocation Service:
handleGroupLostrelied on an atomic value for protection, which was wrong. Replaced that with a mutex.