sheelchand-bah commented on code in PR #11275:
URL: https://github.com/apache/nifi/pull/11275#discussion_r3289472999
##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/Wait.java:
##########
@@ -558,19 +559,22 @@ public void onTrigger(final ProcessContext context, final
ProcessSession session
// Update signal if needed.
try {
if (waitCompleted) {
- protocol.complete(signalId);
+ protocol.complete(signal);
if (logger.isDebugEnabled()) {
logger.debug("Completed wait for signalId='{}' and removed
signal from cache", signalId);
}
} else if (waitProgressed) {
- protocol.replace(signal);
+ if (!protocol.replace(signal)) {
Review Comment:
All though the fix works but the implementation of complete() and replace()
are inconsistent. complete() throws the exception, but for replace the caller
have to check.
It would be better to that replace() also throws exception when concurrent
updates are detected.
--
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]