-
Notifications
You must be signed in to change notification settings - Fork 102
Plug hole that allowed concurrent replication streams #323
Conversation
kirg
commented
Nov 15, 2017
•
edited
Loading
edited
- fix for concurrent replication streams
- update the 'first seqnum' in replication code-path (this was missing)
- added more logs around open/close extent
services/storehost/extMgr.go
Outdated
|
||
if openError != nil { | ||
// mark as not open for replication | ||
atomic.StoreInt32(&ext.openedForReplication, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^^ the fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if openError == nil?
Can you add unit test? |
There is a unit-test that checks to see that when two OpenReplicateStream requests come in, only one will succeed and the other will fail. Unfortunately, this bug shows up when a third OpenReplicateStream request comes in! |
@thuningxu I have updated the existing test to try another (third) replicate-extent request, which should fail; verified that it fails without fix and passes with. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome. Thanks!