[ 
https://issues.apache.org/jira/browse/CASSANDRA-14821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16683650#comment-16683650
 ] 

Alex Petrov edited comment on CASSANDRA-14821 at 11/12/18 11:46 AM:
--------------------------------------------------------------------

Addressed comments from Dinesh, except: 

bq. SecondaryIndexManager#shutdownExecutors, NettyFactory#close, 
PendingRangeCalculatorService#shutdownExecutor, Ref#shutdownReferenceReaper, 
BufferPool#shutdownLocalCleaner, MemTablePool#shutdown - should the number of 
seconds be configurable? At least make it a constant?

Since it's test-only, I'd say it's good enough as it is, we do not have any use 
for those other than tests 

bq. InstanceClassLoader - `id` variable is assigned but unused. Do we need it?

We do, sometimes it's useful to understand which instance you're on, in debug. 
There's a comment indicating that.

bq. MessageFilters#allVerbs - method is unused. Do we need it?

We do: it's a DSL, if you'd like to make node fully unavailable.

bq. TestCluster#withThreadLeakCheck - method is unused. Do we need it? && 
TestCluster#close - L219 did you intend to comment out this?

We do need both of these, until SEPExecutor patch is committed, it makes no 
sense to enable thread leak checks. I'd also say that thread leak check should 
be optimal generally, but rewriting it every time is unnecessary.

[~benedict] I've also changed configuration to avoid using YAML round-trips and 
just make a config right away, without loader. Could you take a short look?

I've also added some tests inspired by [~benedict] patch on re-creating static 
columns, to check what happens during disagreement.


was (Author: ifesdjeen):
Addressed comments from Dinesh, except: 

bq. SecondaryIndexManager#shutdownExecutors, NettyFactory#close, 
PendingRangeCalculatorService#shutdownExecutor, Ref#shutdownReferenceReaper, 
BufferPool#shutdownLocalCleaner, MemTablePool#shutdown - should the number of 
seconds be configurable? At least make it a constant?

Since it's test-only, I'd say it's good enough as it is, we do not have any use 
for those other than tests 

bq. InstanceClassLoader - `id` variable is assigned but unused. Do we need it?

We do, sometimes it's useful to understand which instance you're on, in debug. 
There's a comment indicating that.

bq. MessageFilters#allVerbs - method is unused. Do we need it?

We do: it's a DSL, if you'd like to make node fully unavailable.

bq. TestCluster#withThreadLeakCheck - method is unused. Do we need it? && 
TestCluster#close - L219 did you intend to comment out this?

We do need both of these, until SEPExecutor patch is committed, it makes no 
sense to enable thread leak checks. I'd also say that thread leak check should 
be optimal generally, but rewriting it every time is unnecessary.

[~benedict] I've also changed configuration to avoid using YAML round-trips and 
just make a config right away, without loader. Could you take a short look?

> Make it possible to run multi-node coordinator/replica tests in a single JVM
> ----------------------------------------------------------------------------
>
>                 Key: CASSANDRA-14821
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14821
>             Project: Cassandra
>          Issue Type: Test
>            Reporter: Alex Petrov
>            Assignee: Alex Petrov
>            Priority: Major
>
> This patch proposes an in-JVM Distributed Tester that can help to write 
> distributed tests in a single JVM and be able to control node behaviour in a 
> fine-grained way and set up nodes exactly how one needs it: configuration 
> settings, parameters, which are also controllable in runtime on a per node 
> basis, so each node can have its own unique state.
> It fires up multiple Cassandra Instances in a single JVM. It is done through 
> having distinct class loaders in order to work around the singleton problem 
> in Cassandra. In order to be able to pass some information between the nodes, 
> a common class loader is used that loads up java standard library and several 
> helper classes. Tests look a lot like CQLTester tests would usually look like.
> Each Cassandra Instance, with its distinct class loader is using 
> serialisation and class loading mechanisms in order to run instance-local 
> queries and execute node state manipulation code, hooks, callbacks etc.
> First version mocks out Messaging Service and simplifies schema management by 
> simply running schema change commands on each of the instances separately. 
> Internode communication is mocked by passing ByteBuffers through shared class 
> loader.
> |[patch|https://github.com/ifesdjeen/cassandra/tree/14821]|[tests|https://circleci.com/workflow-run/3d999976-0b8e-40d6-83e0-867129747cc2]|



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to