You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "ifesdjeen (via GitHub)" <gi...@apache.org> on 2025/01/22 18:49:39 UTC

[PR] Fix ConsistentBootstrapTest [cassandra]

ifesdjeen opened a new pull request, #3819:
URL: https://github.com/apache/cassandra/pull/3819

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Re: [PR] Fix ConsistentBootstrapTest [cassandra]

Posted by "dcapwell (via GitHub)" <gi...@apache.org>.
dcapwell commented on code in PR #3819:
URL: https://github.com/apache/cassandra/pull/3819#discussion_r1926055811


##########
test/distributed/org/apache/cassandra/fuzz/ring/ConsistentBootstrapTest.java:
##########
@@ -219,15 +221,17 @@ public void coordinatorIsBehindTest() throws Throwable
                     {
                         if (cluster.get(1).config().broadcastAddress().toString().contains(replica.node().id()))
                         {
-                            HistoryBuilderHelper.insertRandomData(schema, i, ckGen.generate(rng), rng, history);
-                            break outer;
+                            try
+                            {
+                                HistoryBuilderHelper.insertRandomData(schema, i, ckGen.generate(rng), rng, history);

Review Comment:
   why was the `break outer;` removed? 



##########
test/distributed/org/apache/cassandra/fuzz/ring/ConsistentBootstrapTest.java:
##########
@@ -177,39 +182,36 @@ public void coordinatorIsBehindTest() throws Throwable
                        .drop()
                        .on();
 
-                IInstanceConfig config = cluster.newInstanceConfig()
-                                                .set("auto_bootstrap", true)
-                                                .set(Constants.KEY_DTEST_FULL_STARTUP, true)
-                                                .set("progress_barrier_default_consistency_level", "NODE_LOCAL");
-                IInvokableInstance newInstance = cluster.bootstrap(config);
-                // Prime the CMS node to pause before the finish join event is committed
-                long[] metricCounts = new long[4];
-                for (int i = 1; i <= 4; i++)
-                    metricCounts[i - 1] = cluster.get(i).callOnInstance(() -> TCMMetrics.instance.coordinatorBehindPlacements.getCount());
-
                 DataTracker tracker = new DataTracker.SequentialDataTracker();
                 RingAwareInJvmDTestVisitExecutor executor = RingAwareInJvmDTestVisitExecutor.builder()
                                                                                             .replicationFactor(new TokenPlacementModel.SimpleReplicationFactor(2))
                                                                                             .nodeSelector(i -> 2)
                                                                                             .consistencyLevel(ConsistencyLevel.ALL)
+                                                                                            .retryPolicy(InJvmDTestVisitExecutor.RetryPolicy.NO_RETRY)
                                                                                             .build(schema,
                                                                                                    tracker,
                                                                                                    new QuiescentChecker(schema.valueGenerators, tracker, history),
                                                                                                    cluster);
 
+                // Prime the CMS node to pause before the finish join event is committed
+                Callable<?> pending = pauseBeforeCommit(cmsInstance, (e) -> e instanceof PrepareJoin.MidJoin);

Review Comment:
   so block midjoin *before* we create/start the node rather than after?  makes sense



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Re: [PR] Fix ConsistentBootstrapTest [cassandra]

Posted by "ifesdjeen (via GitHub)" <gi...@apache.org>.
ifesdjeen commented on code in PR #3819:
URL: https://github.com/apache/cassandra/pull/3819#discussion_r1926506799


##########
test/distributed/org/apache/cassandra/fuzz/ring/ConsistentBootstrapTest.java:
##########
@@ -219,15 +221,17 @@ public void coordinatorIsBehindTest() throws Throwable
                     {
                         if (cluster.get(1).config().broadcastAddress().toString().contains(replica.node().id()))
                         {
-                            HistoryBuilderHelper.insertRandomData(schema, i, ckGen.generate(rng), rng, history);
-                            break outer;
+                            try
+                            {
+                                HistoryBuilderHelper.insertRandomData(schema, i, ckGen.generate(rng), rng, history);

Review Comment:
   The problem was that the test was just implemented in a wrong way. I did my best to reproduce pre-harry-2 logic. When rewriting the patch for harry2, rather than catching-and-ignoring the exception, and then looking at the log, the test was just throwing an exception, and then timing out because one of the nodes was paused.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Re: [PR] Fix ConsistentBootstrapTest [cassandra]

Posted by "ifesdjeen (via GitHub)" <gi...@apache.org>.
ifesdjeen closed pull request #3819: Fix ConsistentBootstrapTest
URL: https://github.com/apache/cassandra/pull/3819


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org