adoroszlai commented on a change in pull request #1287: HDDS-1956. Aged IO 
Thread exits on first read
URL: https://github.com/apache/hadoop/pull/1287#discussion_r313470272
 
 

 ##########
 File path: 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneLoadGenerator.java
 ##########
 @@ -201,11 +210,12 @@ private void startAgedFilesLoad(long runTimeMillis) {
       String keyName = null;
       try {
         if (agedWriteProbability.isTrue()) {
-          keyName = writeData(agedFileWrittenIndex.incrementAndGet(),
+          keyName = writeData(agedFileWrittenIndex.getAndIncrement(),
 
 Review comment:
   Can you please clarify what's the issue here?
   
   Random index selection gives a number in `[0, currentIndex)` (see 
`RandomUtils.nextInt(0, currentIndex)`).
   
   Previously files were written starting at 1 and `currentIndex` equaled the 
last written key index.  Now `currentIndex` is last written key index + 1, so 
the random choice always produces an existing key index.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to