Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MB-7506: Allow percentages to change high and low watermarks

Can be set by specifying percentages of bucket's mem_quota

./cbepctl localhost:12000 set flush_param mem_high_wat 90%

Change-Id: I9873030901014f5f62a54db89e44e0875190a1e0
Reviewed-on: http://review.couchbase.org/25423
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
  • Loading branch information...
commit 0b100d2e6be9f00cf2715db9af8d97472966aed4 1 parent 3b7d41d
@abhinavdangeti abhinavdangeti authored mikewied committed
Showing with 12 additions and 0 deletions.
  1. +12 −0 management/cbepctl
View
12 management/cbepctl
@@ -52,6 +52,18 @@ def set_param(mc, type, key, val):
if key == 'tap_throttle_queue_cap' and val == 'infinite':
val = '-1'
+ if key == "mem_high_wat" or key == "mem_low_wat":
+ if val.endswith("%"):
+ _x_ = (val[:len(val)-1])
+ if not _x_.isdigit():
+ print 'Error: Invalid parameter %s' % val
+ return
+ if float(_x_) > 100:
+ print 'Error: Bad parameter %s' % val
+ return
+ _quota_ = int(mc.stats()['ep_max_data_size'])
+ val = str(int(float(_x_)*(_quota_)/100))
+
try:
mc.set_param(key, val, engine_param)
print 'set %s to %s' %(key, val)
Please sign in to comment.
Something went wrong with that request. Please try again.