HDDS-5324. Delete unnecessary calls to decNumKeys in OMKeysDeleteRequest#2319
HDDS-5324. Delete unnecessary calls to decNumKeys in OMKeysDeleteRequest#2319bharatviswa504 merged 1 commit intoapache:masterfrom
Conversation
| } | ||
| break; | ||
| case FAILURE: | ||
| omMetrics.decNumKeys(deleteKeys.size()); |
There was a problem hiding this comment.
// reset deleteKeys as request failed.
deleteKeys = new ArrayList<>();
So, even without this fix also I don't see an issue. Have you observed any issue?
Or you want to avoid unnecessary call to decNumKeys is this the reason for PR?
There was a problem hiding this comment.
Thanks for review, sorry for i overlooked it in catch.
If in order to avoid unnecessary calls to decNumKeys, is it necessary to delete it?
There was a problem hiding this comment.
I will modify the title if necessary, otherwise I will close this pr.
There was a problem hiding this comment.
We can remove that unnecessary call. I am fine with it. You can update the Jira description.
|
This just removes unnecessary codeine, and test failures are unrelated to the patch. |
|
Thank you @wzhallright for the contribution. |
What changes were proposed in this pull request?
If you fail to delete keys, you can avoid unnecessary calls to decNumKeys.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-5324
How was this patch tested?