-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
HBASE-27230 RegionServer should be aborted when WAL.sync throws Timeo… #4641
Conversation
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
|
||
/** | ||
* If {@link WAL#sync} get a timeout exception, the only correct way is to abort the region | ||
* server, as the design of {@link WAL#sync}, is to succeed or die, there is no 'failure'. It |
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.
Actually we should avoid aborting the RS when the WAL sync is slow or timeout. As in the design of HBASE-22301 we should try to roll slow WALs to connect and rewrite to faster DNs. If you want to recover the flushing of WALs by aborting the RS, you will suffer from a whole MTTR but only the new WAL created by the newly started RS is helpful to the question.
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.
@sunhelly , thank you for review, yes , I could catch your point, here means after we does what you said, such as roll WALs and open a new writer and try to write the WAL entries again and again, and finally WAL.sync still timeout, we abort the RS. We set a very large default value here, 5 minutes, usually the WAL system will abort the region server if it can not finish the sync within 5 minutes, see HBASE-27233 and #4633 for more discussion.
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.
Got it, agree with the point 'no failure for WAL sync', whenever WAL.sync throws exception(no matter it is timeout or other), the regionserver should abort. This is a common logic.
🎊 +1 overall
This message was automatically generated. |
* so there is no need to replicate to secondary replica, for this reason here we attach the | ||
* region replication action after the {@link HRegion#sync} is successful. | ||
*/ | ||
this.attachRegionReplicationInWALAppend(batchOp, miniBatchOp, walKey, walEdit, writeEntry); |
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.
Let's not include this change here? Should be a separated issue.
/** | ||
* Thrown when {@link WAL#sync} timeout. | ||
*/ | ||
@SuppressWarnings("serial") |
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.
Just add a generated serial id?
💔 -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. |
💔 -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. |
@@ -62,9 +62,9 @@ void init(FileSystem fs, Path path, Configuration c, boolean overwritable, long | |||
StreamSlowMonitor monitor) throws IOException, CommonFSUtils.StreamLacksCapabilityException; | |||
} | |||
|
|||
private EventLoopGroup eventLoopGroup; |
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.
Add comments to say this will be used in tests.
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.
@Apache9 ,ok ,fixed.
💔 -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. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
apache#4641) Signed-off-by: Duo Zhang <zhangduo@apache.org> Change-Id: I4a413143681376235a250d164fec36ff9eb377b4
…throws Timeout apache#4641) Signed-off-by: Duo Zhang <zhangduo@apache.org> Change-Id: I4a413143681376235a250d164fec36ff9eb377b4
…utIOException