You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Dinesh Chitlangia (Jira)" <ji...@apache.org> on 2021/02/14 04:45:00 UTC
[jira] [Resolved] (HDDS-4809) Add comment to FilePerChunkStrategy
for readability
[ 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: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org