Skip to content

Commit 9556266

Browse files
GSI : fix compression settings
Change-Id: I0f8d25e09a7290f40e3a62818f16eb3875a25d55 Reviewed-on: https://review.couchbase.org/c/perfrunner/+/170858 Tested-by: Build Bot <[email protected]> Reviewed-by: vikas chaudhary <[email protected]>
1 parent 509e038 commit 9556266

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

perfrunner/helpers/rest.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff 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:

0 commit comments

Comments
 (0)