jojochuang commented on code in PR #5687:
URL: https://github.com/apache/hadoop/pull/5687#discussion_r1351520185
##########
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DataStreamer.java:
##########
@@ -916,7 +917,7 @@ void waitForAckedSeqno(long seqno) throws IOException {
try (TraceScope ignored = dfsClient.getTracer().
newScope("waitForAckedSeqno")) {
LOG.debug("{} waiting for ack for: {}", this, seqno);
- int dnodes = nodes != null ? nodes.length : 3;
+ int dnodes = nodes.length > 0 ? nodes.length : 3;
Review Comment:
volatile does not guarantee that. You'd need something similar to
AtomicInteger.compareAndSet()
--
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]