adoroszlai opened a new pull request #1183: URL: https://github.com/apache/hadoop-ozone/pull/1183
## What changes were proposed in this pull request? Add missing `setIndexToTerm(this::getTermForIndex)` call to `OzoneManagerDoubleBuffer.Builder` chain, and extract duplicate code to a new method. https://issues.apache.org/jira/browse/HDDS-3944 ## How was this patch tested? Reproduced the problem with integration test: ``` [INFO] Running org.apache.hadoop.ozone.om.TestOMRatisSnapshots [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 29.849 s <<< FAILURE! - in org.apache.hadoop.ozone.om.TestOMRatisSnapshots [ERROR] testInstallSnapshot(org.apache.hadoop.ozone.om.TestOMRatisSnapshots) Time elapsed: 29.772 s <<< ERROR! java.lang.NullPointerException: When ratis is enabled indexToTerm should not be null at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:897) at org.apache.hadoop.ozone.om.ratis.OzoneManagerDoubleBuffer$Builder.build(OzoneManagerDoubleBuffer.java:154) at org.apache.hadoop.ozone.om.ratis.OzoneManagerStateMachine.lambda$unpause$3(OzoneManagerStateMachine.java:338) at org.apache.ratis.util.LifeCycle.startAndTransition(LifeCycle.java:214) at org.apache.hadoop.ozone.om.ratis.OzoneManagerStateMachine.unpause(OzoneManagerStateMachine.java:331) at org.apache.hadoop.ozone.om.TestOMRatisSnapshots.testInstallSnapshot(TestOMRatisSnapshots.java:183) ``` Verified the fix using the same test: ``` [INFO] Running org.apache.hadoop.ozone.om.TestOMRatisSnapshots [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 29.278 s - in org.apache.hadoop.ozone.om.TestOMRatisSnapshots ``` https://github.com/adoroszlai/hadoop-ozone/runs/853845496 ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org