From f938c4267e14c94bfa18e69e4be3ec96ada96384 Mon Sep 17 00:00:00 2001 From: Nhat Nguyen Date: Tue, 20 Mar 2018 13:54:38 -0400 Subject: [PATCH] Fix BWC issue for PreSyncedFlushResponse I misunderstood how the bwc versions works. If we backport to 5.x, we need to backport to all supported 6.*. This commit corrects the BWC versions for PreSyncedFlushResponse. Relates #29103 --- .../indices/flush/SyncedFlushService.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/indices/flush/SyncedFlushService.java b/server/src/main/java/org/elasticsearch/indices/flush/SyncedFlushService.java index 65bacd94910..b8b294a90d4 100644 --- a/server/src/main/java/org/elasticsearch/indices/flush/SyncedFlushService.java +++ b/server/src/main/java/org/elasticsearch/indices/flush/SyncedFlushService.java @@ -561,19 +561,11 @@ public class SyncedFlushService extends AbstractComponent implements IndexEventL } boolean includeNumDocs(Version version) { - if (version.major == Version.V_5_6_8.major) { - return version.onOrAfter(Version.V_5_6_8); - } else { - return version.onOrAfter(Version.V_6_2_2); - } + return version.onOrAfter(Version.V_5_6_8); } boolean includeExistingSyncId(Version version) { - if (version.major == Version.V_5_6_9.major) { - return version.onOrAfter(Version.V_5_6_9); - } else { - return version.onOrAfter(Version.V_6_3_0); - } + return version.onOrAfter(Version.V_5_6_9); } @Override