Apache9 commented on PR #5409:
URL: https://github.com/apache/hbase/pull/5409#issuecomment-1723466587

   > 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](https://issues.apache.org/jira/browse/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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to