[
https://issues.apache.org/jira/browse/HDDS-4809?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dinesh Chitlangia resolved HDDS-4809.
-------------------------------------
Fix Version/s: 1.2.0
Resolution: Fixed
> Add comment to FilePerChunkStrategy for readability
> ---------------------------------------------------
>
> Key: HDDS-4809
> URL: https://issues.apache.org/jira/browse/HDDS-4809
> Project: Apache Ozone
> Issue Type: Improvement
> Reporter: Janus Chow
> Assignee: Janus Chow
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.2.0
>
>
> In FilePerChunkStrategy.readChunk(), the following code seems confused, asĀ
> _finalChunkFile_ was added twice.
> {code:java}
> List<File> possibleFiles = new ArrayList<>();
> possibleFiles.add(finalChunkFile);
> if (dispatcherContext != null && dispatcherContext.isReadFromTmpFile()) {
> possibleFiles.add(getTmpChunkFile(finalChunkFile, dispatcherContext));
> possibleFiles.add(finalChunkFile);
> }
> {code}
> After checking HDDS-2372, I found it's a simple solution to solve race
> condition between read and commit. This ticket is to add some comments to
> save the time for later code readers.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]