[
https://issues.apache.org/jira/browse/HDDS-8665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17756096#comment-17756096
]
Hemant Kumar edited comment on HDDS-8665 at 8/18/23 6:36 PM:
-------------------------------------------------------------
Issue is that at final stage of snapshot purge we update the [snapshot chain
and next global & path level snapshots in
DB|https://github.com/apache/ozone/blob/master/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/response/snapshot/OMSnapshotPurgeResponse.java#L112].
When we update next global and path level snapshots in DB, it doesn’t not
[update the
cache|https://github.com/apache/ozone/blob/master/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/response/snapshot/OMSnapshotPurgeResponse.java#L144].
SnapshotInfo [read happens from the
cache|https://github.com/apache/ozone/blob/master/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/response/snapshot/OMSnapshotPurgeResponse.java#L149].
was (Author: JIRAUSER297350):
Issue is that at final stage of snapshot purge we update the [snapshot chain
and next global & path level snapshots in
DB|https://github.com/apache/ozone/blob/master/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/response/snapshot/OMSnapshotPurgeResponse.java#L112].
When we update next global and path level snapshots in DB, it doesn’t not
update the cache
[code|https://github.com/apache/ozone/blob/master/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/response/snapshot/OMSnapshotPurgeResponse.java#L144].
SnapshotInfo read happens from the cache
[code|https://github.com/apache/ozone/blob/master/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/response/snapshot/OMSnapshotPurgeResponse.java#L149].
> OmDBSnapshotInfoCodec.copyObject(..) does not follow the general contract of
> copy.
> ----------------------------------------------------------------------------------
>
> Key: HDDS-8665
> URL: https://issues.apache.org/jira/browse/HDDS-8665
> Project: Apache Ozone
> Issue Type: Sub-task
> Components: OM, Snapshot
> Reporter: Tsz-wo Sze
> Assignee: Hemant Kumar
> Priority: Critical
> Attachments: HDDS-8665_bug.patch
>
>
> OmDBSnapshotInfoCodec.copyObject(..) is a shallow copy -- it simply returns
> the same object. However, if it is changed to return a deep copy as shown in
> the second comment, TestOMSnapshotDeleteRequest and
> TestOMSnapshotPurgeRequestAndResponse will fail. These two tests depend on
> the behavior that, after copying, changing one copy will also change the
> other copy.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]