File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -194,10 +194,22 @@ def get_query_settings(self, host: str):
194194
195195 def set_index_settings (self , host : str , settings : dict ):
196196 api = 'http://{}:9102/settings' .format (host )
197-
197+ count = 0
198198 curr_settings = self .get_index_settings (host )
199199 for option , value in settings .items ():
200200 if option in curr_settings :
201+ if "enableInMemoryCompression" in option and not value :
202+ while count <= 10 :
203+ compression = self .get_index_settings (host )[option ]
204+ if compression :
205+ logger .info ("current compression settings {}" .format (compression ))
206+ break
207+ else :
208+ time .sleep (30 )
209+ compression = self .get_index_settings (host )[option ]
210+ count += 1
211+ if count == 10 :
212+ raise Exception ("Unable to set compression disabled after 5 min" )
201213 logger .info ('Changing {} to {}' .format (option , value ))
202214 self .post (url = api , data = json .dumps ({option : value }))
203215 else :
You can’t perform that action at this time.
0 commit comments