[
https://issues.apache.org/jira/browse/HDDS-14015?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Swaminathan Balachandran updated HDDS-14015:
--------------------------------------------
Description: A snapshot handle present inside a snapshot cache can be
reused. Once the snapshot content lock is taken a rocksdb handle could be still
present in the snapshot cache and after the atomic switch the old db handle
could still get reused for writes thus missing potential writes on the newly
switched db. Hence while performing the atomic switch a snapshot cache lock
should be acquired to ensure the next db handle would always be from the new
rocksdb handle. So deletion of older directories should be under the snapshot
content lock. (was: A snapshot handle present inside a snapshot cache can be
reused. Once the snapshot content lock is taken a rocksdb handle could be still
present in the snapshot cache and after the atomic switch the old db handle
could still get reused for writes thus missing potential writes on the newly
switched db. Hence while performing the move directory a snapshot cache lock
should be acquired to ensure the next db handle would always be from the new
rocksdb handle.)
> Atomic Switch of Snapshot db after defrag should be done under a
> SNAPSHOT_DB_LOCK
> ---------------------------------------------------------------------------------
>
> Key: HDDS-14015
> URL: https://issues.apache.org/jira/browse/HDDS-14015
> Project: Apache Ozone
> Issue Type: Sub-task
> Reporter: Swaminathan Balachandran
> Assignee: Swaminathan Balachandran
> Priority: Major
> Labels: pull-request-available
>
> A snapshot handle present inside a snapshot cache can be reused. Once the
> snapshot content lock is taken a rocksdb handle could be still present in the
> snapshot cache and after the atomic switch the old db handle could still get
> reused for writes thus missing potential writes on the newly switched db.
> Hence while performing the atomic switch a snapshot cache lock should be
> acquired to ensure the next db handle would always be from the new rocksdb
> handle. So deletion of older directories should be under the snapshot content
> lock.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]