hemantk-12 commented on code in PR #5968:
URL: https://github.com/apache/ozone/pull/5968#discussion_r1449283781
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotCache.java:
##########
@@ -296,105 +262,34 @@ private synchronized void cleanup() {
* TODO: [SNAPSHOT] Add new ozone debug CLI command to trigger this directly.
*/
private void cleanupInternal() {
- long numEntriesToEvict = (long) dbMap.size() - cacheSizeLimit;
- while (numEntriesToEvict > 0L && pendingEvictionList.size() > 0) {
- // Get the first instance in the clean up list
- ReferenceCounted<IOmMetadataReader, SnapshotCache> rcOmSnapshot =
- pendingEvictionList.iterator().next();
+ Iterator<Map.Entry<String, ReferenceCounted<IOmMetadataReader,
SnapshotCache>>> iterator =
+ dbMap.entrySet().iterator();
+ while (iterator.hasNext()) {
Review Comment:
We can have follow up task for it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]