You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by if...@apache.org on 2020/01/17 13:31:24 UTC
[cassandra] branch trunk updated: In-JVM dtest cluster
uncaughtExceptions propagation of exception goes to the wrong instance,
it uses cluster generation when it should be using the instance id
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
The following commit(s) were added to refs/heads/trunk by this push:
new 8f355ca In-JVM dtest cluster uncaughtExceptions propagation of exception goes to the wrong instance, it uses cluster generation when it should be using the instance id
8f355ca is described below
commit 8f355ca2c25836784085f55eb464ad12ffaa1716
Author: David Capwell <dc...@gmail.com>
AuthorDate: Thu Dec 12 10:14:23 2019 -0800
In-JVM dtest cluster uncaughtExceptions propagation of exception goes to the wrong instance, it uses cluster generation when it should be using the instance id
Patch by David Capwell; reviewed by Alex Petrov for CASSANDRA-15450
---
.../org/apache/cassandra/distributed/impl/AbstractCluster.java | 3 +--
.../org/apache/cassandra/distributed/impl/InstanceClassLoader.java | 7 ++++++-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/test/distributed/org/apache/cassandra/distributed/impl/AbstractCluster.java b/test/distributed/org/apache/cassandra/distributed/impl/AbstractCluster.java
index dd01896..47f76fd 100644
--- a/test/distributed/org/apache/cassandra/distributed/impl/AbstractCluster.java
+++ b/test/distributed/org/apache/cassandra/distributed/impl/AbstractCluster.java
@@ -43,7 +43,6 @@ import com.google.common.collect.Sets;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.apache.cassandra.config.DatabaseDescriptor;
import org.apache.cassandra.db.ColumnFamilyStore;
import org.apache.cassandra.db.ConsistencyLevel;
import org.apache.cassandra.db.Keyspace;
@@ -497,7 +496,7 @@ public abstract class AbstractCluster<I extends IInstance> implements ICluster,
return;
}
InstanceClassLoader cl = (InstanceClassLoader) thread.getContextClassLoader();
- get(cl.getGeneration()).uncaughtException(thread, error);
+ get(cl.getInstanceId()).uncaughtException(thread, error);
}
protected interface Factory<I extends IInstance, C extends AbstractCluster<I>>
diff --git a/test/distributed/org/apache/cassandra/distributed/impl/InstanceClassLoader.java b/test/distributed/org/apache/cassandra/distributed/impl/InstanceClassLoader.java
index 5ada263..75a8912 100644
--- a/test/distributed/org/apache/cassandra/distributed/impl/InstanceClassLoader.java
+++ b/test/distributed/org/apache/cassandra/distributed/impl/InstanceClassLoader.java
@@ -81,11 +81,16 @@ public class InstanceClassLoader extends URLClassLoader
this.id = id;
}
- public int getGeneration()
+ public int getClusterGeneration()
{
return generation;
}
+ public int getInstanceId()
+ {
+ return id;
+ }
+
@Override
public Class<?> loadClass(String name) throws ClassNotFoundException
{
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org