Skip to content

Commit

Permalink
CLDSRV-520: remove bucket quota count metrics update from api
Browse files Browse the repository at this point in the history
  • Loading branch information
williamlardier committed Apr 18, 2024
1 parent d5ea11a commit 5c4d934
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
3 changes: 0 additions & 3 deletions lib/api/bucketDelete.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ function bucketDelete(authInfo, request, log, cb) {
authInfo,
bucket: bucketName,
});
if (bucketMD.getQuota()) {
monitoring.numberOfBucketQuota.dec();
}
monitoring.promMetrics(
'DELETE', bucketName, '204', 'deleteBucket');
return cb(null, corsHeaders);
Expand Down
5 changes: 0 additions & 5 deletions lib/api/bucketDeleteQuota.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,10 @@ function bucketDeleteQuota(authInfo, request, log, callback) {
requestType: request.apiMethods || 'bucketDeleteQuota',
request,
};
let originalQuota = 0;
return waterfall([
next => standardMetadataValidateBucket(metadataValParams, request.actionImplicitDenies, log,
(err, bucket) => next(err, bucket)),
(bucket, next) => {
originalQuota = bucket.getQuota();
bucket.setQuota(0);
metadata.updateBucket(bucket.getName(), bucket, log, err =>
next(err, bucket));
Expand All @@ -45,9 +43,6 @@ function bucketDeleteQuota(authInfo, request, log, callback) {
'bucketDeleteQuota');
return callback(err, err.code, corsHeaders);
} else {
if (originalQuota > 0) {
monitoring.numberOfBucketQuota.dec();
}
monitoring.promMetrics(
'DELETE', bucketName, '204', 'bucketDeleteQuota');
pushMetric('bucketDeleteQuota', log, {
Expand Down
1 change: 0 additions & 1 deletion lib/api/bucketUpdateQuota.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ function bucketUpdateQuota(authInfo, request, log, callback) {
'updateBucketQuota');
return callback(err, err.code, corsHeaders);
} else {
monitoring.numberOfBucketQuota.inc();
monitoring.promMetrics(
'PUT', bucketName, '200', 'updateBucketQuota');
pushMetric('updateBucketQuota', log, {
Expand Down

0 comments on commit 5c4d934

Please sign in to comment.