From bb899296ba17c1f516a0f8950a29645a3c6be378 Mon Sep 17 00:00:00 2001 From: Marc Handalian Date: Tue, 6 Sep 2022 22:16:26 -0700 Subject: [PATCH] PR feedback. Signed-off-by: Marc Handalian --- CHANGELOG.md | 1 - .../java/org/opensearch/index/engine/NRTReplicationEngine.java | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 797d383889b4a..3ab8bb116ea41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,7 +48,6 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - [Segment Replication] Update flaky testOnNewCheckpointFromNewPrimaryCancelOngoingReplication unit test ([#4414](https://github.com/opensearch-project/OpenSearch/pull/4414)) - Fixed the `_cat/shards/10_basic.yml` test cases fix. - ### Security - CVE-2022-25857 org.yaml:snakeyaml DOS vulnerability ([#4341](https://github.com/opensearch-project/OpenSearch/pull/4341)) diff --git a/server/src/main/java/org/opensearch/index/engine/NRTReplicationEngine.java b/server/src/main/java/org/opensearch/index/engine/NRTReplicationEngine.java index 39ebb5847b9cc..12d420aa245fa 100644 --- a/server/src/main/java/org/opensearch/index/engine/NRTReplicationEngine.java +++ b/server/src/main/java/org/opensearch/index/engine/NRTReplicationEngine.java @@ -122,7 +122,7 @@ public TranslogManager translogManager() { public synchronized void updateSegments(final SegmentInfos infos, long seqNo) throws IOException { // Update the current infos reference on the Engine's reader. - long incomingGeneration = infos.getGeneration(); + final long incomingGeneration = infos.getGeneration(); readerManager.updateSegments(infos); // Commit and roll the xlog when we receive a different generation than what was last received.