cheddar commented on a change in pull request #12132:
URL: https://github.com/apache/druid/pull/12132#discussion_r781631262



##########
File path: 
core/src/main/java/org/apache/druid/java/util/common/io/smoosh/FileSmoosher.java
##########
@@ -82,6 +84,10 @@
   private List<File> completedFiles = new ArrayList<>();
   // list of files in process writing content using delegated smooshedWriter.
   private List<File> filesInProcess = new ArrayList<>();
+  // delegated smooshedWriter creates a new temporary file per file added. we 
use a counter to name these temporary
+  // files, and map the file number to the file name so we don't have to 
escape the file names (e.g. names with '/')
+  private int delegateFileCounter = 0;

Review comment:
       While this is likely only ever used in a single-threaded context.  The 
extra overhead of an `AtomicLong` is basically nothing and it makes for a bit 
nicer guarantees, so I'd suggest using that instead.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to