You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2020/08/20 14:39:23 UTC

[incubator-ponymail-foal] 02/02: Minimum ES 6.0; drop check done in Elastic

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git

commit 8ee77a7119ad551aae9268483a810f49188f3504
Author: Sebb <se...@apache.org>
AuthorDate: Thu Aug 20 15:39:03 2020 +0100

    Minimum ES 6.0; drop check done in Elastic
---
 tools/archiver.py | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/tools/archiver.py b/tools/archiver.py
index 2899cbd..0827844 100755
--- a/tools/archiver.py
+++ b/tools/archiver.py
@@ -245,7 +245,7 @@ class Archiver(object):  # N.B. Also used by import-mbox.py
     """ Intercept index calls and fix up consistency argument """
 
     def index(self, **kwargs):
-        if ES_MAJOR in [5, 6, 7]:
+        if ES_MAJOR in [6, 7]:
             if kwargs.pop("consistency", None):  # drop the key if present
                 if self.wait_for_active_shards:  # replace with wait if defined
                     kwargs["wait_for_active_shards"] = self.wait_for_active_shards
@@ -488,16 +488,6 @@ class Archiver(object):  # N.B. Also used by import-mbox.py
         else:
             self.elastic = plugins.elastic.Elastic()
 
-        # Always allow this to be set; will be replaced as necessary by wait_for_active_shards
-        self.consistency = config["elasticsearch"].get("write", "quorum")
-        es_engine_major = self.elastic.engineMajor()
-        if es_engine_major == 2:
-            pass
-        elif es_engine_major in [5, 6, 7]:
-            self.wait_for_active_shards = config["elasticsearch"].get("wait", 1)
-        else:
-            raise Exception("Unexpected elasticsearch version ", es_engine_major)
-
         try:
             if contents:
                 for key in contents: