-
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-28090 Make entryReader field final in ReplicationSourceShipper … #5409
Conversation
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
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.
So the aim here is to make wal reader final to avoid it from being set to null, inadvertently? I think the NPE condition reported in HBASE-28076 would not be possible in master branch code, because we are not trying to reuse RecoveredReplicationSourceShipper logic to read wal position (we now do it from ReplicationSource.getStartOffset), which will not call RecoveredReplicationSourceShipper.terminate in the event of failing to get WAL position).
Yes, we have a null check in ReplicationSource.terminate, which is not necessary, but since it is not final, it is possible that after changing the initialization order we hit the NPE again, so here I reactored a bit to make it final so it will never be null. |
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.
Thanks for confirming. LGTM!
…class (#5409) Signed-off-by: Wellington Chevreuil <[email protected]> (cherry picked from commit 787d524)
…class (apache#5409) Signed-off-by: Wellington Chevreuil <[email protected]>
…class