[ 
https://issues.apache.org/jira/browse/HDDS-14768?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Saketa Chalamchala updated HDDS-14768:
--------------------------------------
    Description: 
1. SnapshotCache cleanup might be unnecessarily strict. 
The cleanup throws an `IllegalStateException` when it finds stale entries in 
`pendingEvictionQueue` for snapshots that have already been removed from dbMap 
(say SnapshotPurge invalidates the entry right before the last thread with a 
reference to the snapshot just closes adding the snapshotID back to the 
evictionQueue).
It might be better for cleanup to log the stale entry proceed without throwing 
since this is not a correctness bug.

2. `invalidate` should also remove the entry from `pendingEvictionQueue` to be 
more consistent with bookkeeping.

3. Snapshot close failure during cleanup removes the entry from eviction queue 
and throws an exception. 

  was:
SnapshotCache cleanup might be unnecessarily strict. 
The cleanup throws an `IllegalStateException` when it finds stale entries in 
`pendingEvictionQueue` for snapshots that have already been removed from dbMap 
(say when SnapshotPurge invalidates the entry).

It might be better for cleanup to log the stale entry proceed without failing 
since this is not a correctness bug.

Also, invalidate should also remove the entry from `pendingEvictionQueue` to be 
more consistent with bookkeeping.


> Fix lock leak on SnapshotCache cleanup and handle eviction race appropriately
> -----------------------------------------------------------------------------
>
>                 Key: HDDS-14768
>                 URL: https://issues.apache.org/jira/browse/HDDS-14768
>             Project: Apache Ozone
>          Issue Type: Bug
>          Components: OM
>            Reporter: Saketa Chalamchala
>            Assignee: Saketa Chalamchala
>            Priority: Major
>
> 1. SnapshotCache cleanup might be unnecessarily strict. 
> The cleanup throws an `IllegalStateException` when it finds stale entries in 
> `pendingEvictionQueue` for snapshots that have already been removed from 
> dbMap (say SnapshotPurge invalidates the entry right before the last thread 
> with a reference to the snapshot just closes adding the snapshotID back to 
> the evictionQueue).
> It might be better for cleanup to log the stale entry proceed without 
> throwing since this is not a correctness bug.
> 2. `invalidate` should also remove the entry from `pendingEvictionQueue` to 
> be more consistent with bookkeeping.
> 3. Snapshot close failure during cleanup removes the entry from eviction 
> queue and throws an exception. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to