-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-26960 Another case for unnecessary replication suspending in Re… #4355
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
Conversation
…gionReplicationSink
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
This will cause we write extra data in WAL. Maybe a more lightweight solution is to call RegionReplicationSink.add even when writeFlushWalMarker is false? |
@Apache9 , I think an alternative is we could add an overload |
I think it is OK to not write the WAL but still add it to RegionReplicationSink. A problem for the old implementation of region replication is that, if users use SKIP_WAL, then we can not do region replication any more. WIth the current approach, since we do not need to read WAL from the file, it is OK for us to send out WAL even if we do not want to write the WAL to file. This one could a start. Later we could also try to see if the actual data WAL can be replicated when SKIP_WAL is used. Thanks. |
OK, checked the code again, the problem here is that, if we do not write WAL, then we will not have a MVCC.WriteEntry then we can not use WriteEntry.attachCompletionAction trick. This is a problem. Let me think if there is a way to fix this. Thanks. |
@Apache9, thank you very much , ok, I think we could also add a MVCC entry to maintain the MVCC order to invoke the |
Oh, at least for calling writeFlushRequestMarkerToWAL, we do have a MVCC.WriteEntry... So let's pass it in to the method and also add the WALEntry to RegionReplicationSink. And for the normal updates, we will not build the WALEntry, and we will create a MVCC WriteEntry when applying updates to memstore, in MutationBatchOperation.writeMiniBatchOperationsToMemStore. FWIW, we always need a MVCC WriteEntry to finish a write operation. So I think it is possible to also replicate the edits to secondary replicas even if we set SKIP_WAL. Anyway, should be another issue. Thanks. |
@Apache9 ,thank you very much for reply.
You mean we use the following line 2793 outside the writeFlushRequestMarkerToWAL?
|
@Apache9 , I open a new jira HBASE-26993 to try to work on this problem. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
* @return whether WAL write was successful | ||
*/ | ||
private boolean writeFlushRequestMarkerToWAL(WAL wal, boolean writeFlushWalMarker) { | ||
private boolean writeCanNotFlushMarkerToWAL(WriteEntry flushOpSeqIdMVCCEntry, WAL wal, |
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.
Good. The new method name is better.
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
…gionReplicationSink