Uh oh!
There was an error while loading. Please reload this page.
HBASE-28090 Make entryReader field final in ReplicationSourceShipper … - #5409
Conversation
Apache-HBase
commented
Sep 18, 2023
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Sep 18, 2023
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Sep 18, 2023
🎊 +1 overall
This message was automatically generated. |
wchevreuil
left a comment
There was a problem hiding this comment.
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).
Apache9
commented
Sep 18, 2023
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. |
wchevreuil
left a comment
There was a problem hiding this comment.
Thanks for confirming. LGTM!
…class (apache#5409) Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
…class