swamirishi opened a new pull request, #6965: URL: https://github.com/apache/ozone/pull/6965
## What changes were proposed in this pull request? SstFiltering service directly updates the snapshotInfo and doesn't go through DoubleBufferFlush to update the DB. This interferes with SnapshotInfo updated during SnapshotPurgeRequest. Consider the case: S1 <- S2(SstFiltered) <- S3 (Sst unfiltered) At T1 if S2 is purged and submitted to OM ratis but it hasn't been flushed to the rocksDb but just present in the cache which makes the chain. S1 <- S3 (Sst Unfiltered in cache) S2(SstFiltered, deleted in Cache but present in table) Suppose at T2 SstFiltering service runs on the chain and marks S3 to be SstFiltered which would be directly flushed to DB S1 <- S3 (Sst filtered in DB) S1 <- S2 (Present in DB but not present in cache) Now if the OM is restarted, snapshot chain would have gotten corrupted since both S2 & S3 are pointing S1 in the DB. Changes made in the patch: - Create an sstFiltered file in the same snapshot directory which will denote the snapshot is filtered and take a snapshot lock while creating this file. - Take a lock while deleting the Snapshot directory since that operation is not atomic. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-11068 ## How was this patch tested? Unit tests -- 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]
