This is an automated email from the ASF dual-hosted git repository.
houston pushed a commit to branch branch_9_8
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9_8 by this push:
new e96f62761f8 Fix small race condition in
ZkStateReaderTest.testStateWatcherRaceCondition
e96f62761f8 is described below
commit e96f62761f8b816eaccaf740d6529cae397ba9fe
Author: Houston Putman <[email protected]>
AuthorDate: Fri Feb 21 11:22:12 2025 -0600
Fix small race condition in ZkStateReaderTest.testStateWatcherRaceCondition
(cherry picked from commit d2fdb16a78195e5eb40caf48761afeb1bce041ee)
---
.../core/src/test/org/apache/solr/cloud/overseer/ZkStateReaderTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/solr/core/src/test/org/apache/solr/cloud/overseer/ZkStateReaderTest.java
b/solr/core/src/test/org/apache/solr/cloud/overseer/ZkStateReaderTest.java
index 3d0d522c973..4bd4524d009 100644
--- a/solr/core/src/test/org/apache/solr/cloud/overseer/ZkStateReaderTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/overseer/ZkStateReaderTest.java
@@ -732,12 +732,12 @@ public class ZkStateReaderTest extends SolrTestCaseJ4 {
(coll) -> {
// add a watcher that tracks how many times it's invoked per znode
version
if (coll != null) {
+ invoked.computeIfAbsent(coll.getZNodeVersion(), (k) -> new
LongAdder()).increment();
try {
barrier.await(250, TimeUnit.MILLISECONDS);
} catch (InterruptedException | TimeoutException |
BrokenBarrierException e) {
throw new RuntimeException(e);
}
- invoked.computeIfAbsent(coll.getZNodeVersion(), (k) -> new
LongAdder()).increment();
}
return false;
});