You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Hemant Kumar (Jira)" <ji...@apache.org> on 2023/08/14 22:02:00 UTC

[jira] [Assigned] (HDDS-8665) OmDBSnapshotInfoCodec.copyObject(..) does not follow the general contract of copy.

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

Hemant Kumar reassigned HDDS-8665:
----------------------------------

    Assignee: Hemant Kumar  (was: Prashant Pogde)

> 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: Major
>         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: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org