OneSizeFitsQuorum commented on code in PR #14215:
URL: https://github.com/apache/iotdb/pull/14215#discussion_r1859763341


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/pipeconsensus/PipeConsensusReceiver.java:
##########
@@ -1471,6 +1471,21 @@ private TPipeConsensusTransferResp onRequest(
                   !condition.await(
                       PIPE_CONSENSUS_RECEIVER_MAX_WAITING_TIME_IN_MS, 
TimeUnit.MILLISECONDS);
 
+              // If some reqs find he buffer no longer contains their 
requestMeta after jumping out
+              // from condition.await, it may indicate that during their wait, 
some reqs with newer
+              // pipeTaskStartTimes or rebootTimes came in and refreshed the 
requestBuffer. In that
+              // cases we need to discard this requests.
+              if (!reqExecutionOrderBuffer.contains(requestMeta)) {

Review Comment:
   Please add `condition.signalAll(); ` after `reqExecutionOrderBuffer.clear()`



-- 
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]

Reply via email to