You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2023/08/01 07:22:53 UTC
[camel] branch main updated: (chores) camel-core-model: added debugging and comments (#10936)
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 474aba0262d (chores) camel-core-model: added debugging and comments (#10936)
474aba0262d is described below
commit 474aba0262d4be76abc01000ce821617194cc718
Author: Otavio Rodolfo Piske <or...@users.noreply.github.com>
AuthorDate: Tue Aug 1 09:22:46 2023 +0200
(chores) camel-core-model: added debugging and comments (#10936)
---
.../src/main/java/org/apache/camel/builder/NotifyBuilder.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/builder/NotifyBuilder.java b/core/camel-core-model/src/main/java/org/apache/camel/builder/NotifyBuilder.java
index 8414fc2ce2a..687db9c34a0 100644
--- a/core/camel-core-model/src/main/java/org/apache/camel/builder/NotifyBuilder.java
+++ b/core/camel-core-model/src/main/java/org/apache/camel/builder/NotifyBuilder.java
@@ -1229,7 +1229,9 @@ public class NotifyBuilder {
throw new IllegalStateException("NotifyBuilder has not been created. Invoke the create() method before matching.");
}
try {
- latch.await(timeout, timeUnit);
+ if (!latch.await(timeout, timeUnit)) {
+ LOG.warn("The notify builder latch has timed out. It's likely the condition has never been satisfied");
+ }
} catch (InterruptedException e) {
throw RuntimeCamelException.wrapRuntimeCamelException(e);
}
@@ -1366,6 +1368,11 @@ public class NotifyBuilder {
}
}
+ /*
+ * At a first glance, it may seem like a bug that the latch may not be count down in some cases: this is by design. It
+ * means there was never a match.
+ * This may cause the matchesWaitTime() to take a long time in some cases as it waits for the latch to be counted.
+ */
private synchronized void computeMatches() {
// use a temporary answer until we have computed the value to assign
Boolean answer = null;