[ https://issues.apache.org/jira/browse/CASSANDRA-20795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18010294#comment-18010294 ]
Stefan Miklosovic commented on CASSANDRA-20795: ----------------------------------------------- Investigation conducted in CASSANDRA-19902 shows that "easy solution" is to remove {code} if (!isInitialized()) return Mode.STARTING; {code} from StorageService.operationMode() and check that NodeState is not null, when it is, return STARTING. This fixed the test committed to trunk under (1) but it fails mostly a lot of Accord test. One representative of that being NodeLocalConsistencyTest.testTransaction which fails on AccordService being, suprisingly, null. I have not dug deeper into that but it seems like the fact we are not waiting until StorageService.initServer is fully finished (as that is the reason while isInitialized() would return true, hence not returning STARTING), will somehow "unblock" testTransaction test to continue in its execution while AccordService is not set yet. pinging [~ifesdjeen] [~marcuse] just to raise awareness about this without actually requiring them to do anything at this point :) (1) https://github.com/instaclustr/cassandra/commit/dd6298992f9def5256e90c6e19a653574d053e74 > Operation mode is STARTING instead of JOINING during bootstrap > -------------------------------------------------------------- > > Key: CASSANDRA-20795 > URL: https://issues.apache.org/jira/browse/CASSANDRA-20795 > Project: Apache Cassandra > Issue Type: Bug > Components: Cluster/Membership, Local/Other > Reporter: Paulo Motta > Priority: Normal > > The regression test added by CASSANDRA-19902 checks that the node operation > mode is set to JOINING during bootstrap, and > [this|https://github.com/pauloricardomg/cassandra/blob/CASSANDRA-19902-trunk-prerebase/test/distributed/org/apache/cassandra/distributed/test/ring/BootstrapTest.java#L327] > assertion is failing in trunk and passing in 4.x. The node state is in > {{STARTING}} instead of {{JOINING}} while the node is bootstrap. > I was able to reproduce this with docker using the following steps: > 1. Add long sleep > [here|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/dht/BootStrapper.java#L120] > > 2. Start seed node1 > 3. Start node2 with auto_bootstrap=true > 4. Node1 sees node2 as UJ > {code:none} > $ ./nodetool.sh node1 status -r > Datacenter: datacenter1 > ======================= > Status=Up/Down > |/ State=Normal/Leaving/Joining/Moving > -- Address Load Tokens Owns (effective) Host ID > Rack > UN node1 73.91 KiB 16 100.0% > 6d194555-f6eb-41d0-c000-000000000001 rack1 > UJ node2.casstest ? 16 ? > 6d194555-f6eb-41d0-c000-000000000002 rack1 > {code} > 5. Node2 operation mode is STARTING (it's JOINING on 4.x) > {code:none} > $ ./nodetool.sh node2 netstats > Mode: STARTING > Not sending any streams. > {code} > -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org