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_r313494917
##########
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:
Before key with index=0 is written, the current index is incremented to 1.
So `randomKeyToRead` only sees `currentIndex==0` if there is no key yet.
Please see my [example
log](https://github.com/apache/hadoop/pull/1287#issue-306801835) for reads of
the first key right after the first write (and even after the second one).
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]