[ https://issues.apache.org/jira/browse/HDDS-3623?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bharat Viswanadham updated HDDS-3623: ------------------------------------- Description: Introduce a getReadCopy in table method. As right now, get when a value exists in the cache it returns the cloned copy, so that when it used during double-buffer flush, if other threads modify the object during the flush time we will see some exceptions which are mentioned in HDDS-2344 and HDDS-2322. To avoid this, all the get() values returned are cloned copy if it exists in the cache. But for a few of the requests like OMBucketCreateRequest, we need Volume info (OmVolumeArgs, but we don't use this info during double buffer flush, so we can safely get a cached copy without doing a clone. In this Jira, fixed only Bucket requests. I Will file a new Jira to see where all this new API can be safely used. was: Introduce a getReadCopy in table method. As right now, get when a value exists in the cache it returns the cloned copy, so that when it used during double-buffer flush, if other threads modify the object during the flush time we will see some exceptions like https://issues.apache.org/jira/browse/HDDS-2344. To avoid this, all the get() values returned are cloned copy if it exists in cache. But for few of the requests like OMBucketCreateRequest, we need Volume info (OmVolumeArgs, but we don't use this info during double buffer flush, so we can safely get a cached copy without doing a clone. > Implement getReadCopy in Table. > ------------------------------- > > Key: HDDS-3623 > URL: https://issues.apache.org/jira/browse/HDDS-3623 > Project: Hadoop Distributed Data Store > Issue Type: New Feature > Reporter: Bharat Viswanadham > Assignee: Bharat Viswanadham > Priority: Major > Labels: pull-request-available > > Introduce a getReadCopy in table method. > As right now, get when a value exists in the cache it returns the cloned > copy, so that when it used during double-buffer flush, if other threads > modify the object during the flush time we will see some exceptions which are > mentioned in HDDS-2344 and HDDS-2322. To avoid this, all the get() values > returned are cloned copy if it exists in the cache. > But for a few of the requests like OMBucketCreateRequest, we need Volume info > (OmVolumeArgs, but we don't use this info during double buffer flush, so we > can safely get a cached copy without doing a clone. In this Jira, fixed only > Bucket requests. I Will file a new Jira to see where all this new API can be > safely used. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org