This is an automated email from the ASF dual-hosted git repository. ifesdjeen pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/cassandra.git
commit b55d830b093016cf364a6e8999175e1e3665348d Merge: 91cb934 24d133e Author: Alex Petrov <oleksandr.pet...@gmail.com> AuthorDate: Thu Jan 28 15:34:02 2021 +0100 Merge branch 'cassandra-3.11' into trunk .../distributed/impl/AbstractCluster.java | 24 +++++++++++++--------- .../cassandra/distributed/impl/Instance.java | 6 ++++++ 2 files changed, 20 insertions(+), 10 deletions(-) diff --cc test/distributed/org/apache/cassandra/distributed/impl/Instance.java index 7c94a21,c28493d..b0a6c3f --- a/test/distributed/org/apache/cassandra/distributed/impl/Instance.java +++ b/test/distributed/org/apache/cassandra/distributed/impl/Instance.java @@@ -139,7 -128,7 +139,8 @@@ import static org.apache.cassandra.dist public class Instance extends IsolatedExecutor implements IInvokableInstance { public final IInstanceConfig config; + private volatile boolean initialized = false; + private final long startedAt = System.nanoTime(); // should never be invoked directly, so that it is instantiated on other class loader; // only visible for inheritance @@@ -533,9 -585,10 +534,11 @@@ throw new RuntimeException(t); } }).run(); + + initialized = true; } + private void mkdirs() { new File(config.getString("saved_caches_directory")).mkdirs(); @@@ -694,9 -748,11 +697,12 @@@ .thenRun(super::shutdown); } + @Override public int liveMemberCount() { + if (!initialized || isShutdown()) + return 0; + return sync(() -> { if (!DatabaseDescriptor.isDaemonInitialized() || !Gossiper.instance.isEnabled()) return 0; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org