Skip to content

Commit

Permalink
Revert "Remove hardcoded timeout in favor of relying on global ZK tim…
Browse files Browse the repository at this point in the history
…eout (#1…" (#1149)

This reverts commit d2b61c0.
  • Loading branch information
bryanlb authored Nov 4, 2024
1 parent 7c5b8df commit 4df7987
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,12 @@ public void removeListener(AstraMetadataStoreChangeListener<T> watcher) {

private void awaitCacheInitialized() {
try {
cacheInitialized.await();
if (!cacheInitialized.await(30, TimeUnit.SECONDS)) {
// in the event we deadlock, go ahead and time this out at 30s and restart the pod
new RuntimeHalterImpl()
.handleFatal(
new TimeoutException("Timed out waiting for Zookeeper cache to initialize"));
}
} catch (InterruptedException e) {
new RuntimeHalterImpl().handleFatal(e);
}
Expand Down

0 comments on commit 4df7987

Please sign in to comment.