aswinshakil opened a new pull request, #5934: URL: https://github.com/apache/ozone/pull/5934
## What changes were proposed in this pull request? While accessing snapshots, We use `SnapshotCache` to load and retrieve a snapshot's RocksDB instance. The function call is as follows `get()->cleanup()`, When multiple background process calls `get()` some threads can also be doing the`cleanup()` of pending eviction list. There is a scenario, where Thread 1(KeyDeletingService) is executing `get()->cleanup()` method and Thread 2(SSTFilteringService) is executing `get()` (Hasn't reached `cleanup()` yet), The reference count of the snapshot is incremented by `get()`(`Thread 2`) but we still close the rocksDB instance because the `cleanup()`(`Thread1`) method assumes everything in the pending eviction list has a reference count of 0. This is not the case in the above-mentioned scenario, We need to recheck if the reference count is still 0 when closing the RocksDB instance. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-10076 ## How was this patch tested? Manually tested with an existing test. -- 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]
