Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
SstFilteringService marks the sstFilter flag for a snapshot and updates the RocksDB, code. It may cause snapshot chain corruption (probably not after the fix: https://github.com/apache/ozone/pull/6443) or data inconsistency due to race condition because SstFilteringService updates snapshot info in parallel to SnapshotPurge and SnapshotProperty which also update snapshot info. Even tho SstFilteringService takes a lock before updating snapshotInfo, SnapshotPurge and SnapshotProperty APIs don't take a lock and rely on OMStateMachine because OMStateMachine is going to process each request sequentially.
In general, each update to snapshotInfoTable should go through API but that is not possible for SstFilteringService because SstFilteringService runs on each OM independently. Hence it is directly updating snapshotInfoTable.
So we need to introduce the lock for SnapshotPurge and SetSnapshotProperty APIs unless there is another better way.
Attachments
Issue Links
- links to