-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SealShard state change in pre-commit #99
Comments
I revisit the idea here and have a new thought. if we rollback seal_shard and change the shard status from sealed to open in some corner case , who can seal this shard again? when dm open a shard , it will store the shard info in the kv store of cm. when it closes the shard, it will remove that kv item from cm. if dm send seal_shard message to sm leader, and sm leader will pre_commit the message, which will change the status of the shard to sealed , and send a success response to dm before it sends the log entry to followers. if dm receives the ok response, it will remove the kv item from cm and konw nothing about that shard. if the message is rollbacked in some corner case , the shard will be changed from sealed to open, and it will be an orphan open shard since nobody knows it is in open state, and thus nobody will try to seal it. do we need a separate scrubber to find all the orphan open shards and seal them? |
I am not sure if I understand it correctly. The rollback will be called only when the quorum cannot reach and decide to rollback this commit . In this case, why client(DM ) will get a success response? |
I'm trying to remember this issue and reconcile with the changes we've made recently. So the problem is that a Blob can be received on the data path referencing a Shard that has been sealed already right? This could happen because of ordering issues between the DataPath and RaftPath or when a member is resyncing and receiving Blobs and log entries out-of-order? Obviously we need to receive all Blob data over the data path prior to processing any SealShard in the log the blobs reference, or at the very least before putting it back in the heap allocator... |
@xiaoxichen |
are we using async mode? I think we are using regular flow |
@xiaoxichen |
Now we update shard state in commit, which introduce racing beween sealshard vs putBlob.
Marking shard as sealed in pre-commit , failing following putBlob(whose LSN >X) , and do roll_back if consensus cannot reach
The text was updated successfully, but these errors were encountered: