Skip to content

Commit

Permalink
MB-53946: [serverless] Dump the current bucket usage every minute
Browse files Browse the repository at this point in the history
It looks like the testing of metering has increased and we
currently get bug reports reported from information available
via prometheus (for instance a bug report where kv metering
gets reported as always being 0). It is unknown if this is
a bug where the the information _isn't_ being collected
in memcached; it isn't being reported to prometheus.

This patch dumps the current bucket usage every minute

Change-Id: Ib084295e1f949f16e80f8fc8c89e8c5eb17671d5
Reviewed-on: https://review.couchbase.org/c/kv_engine/+/180709
Reviewed-by: James H <james.harrison@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>
  • Loading branch information
trondn committed Oct 3, 2022
1 parent e151d48 commit e9eda5d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions daemon/buckets.cc
Expand Up @@ -256,6 +256,10 @@ void Bucket::tick() {
}
}
});

if (isServerlessDeployment() && mc_time_get_current_time() % 60 == 0) {
LOG_INFO("Bucket usage: {}", to_json().dump());
}
}

void Bucket::deleteThrottledCommands() {
Expand Down

0 comments on commit e9eda5d

Please sign in to comment.