tolbertam commented on code in PR #4644:
URL: https://github.com/apache/cassandra/pull/4644#discussion_r2986336501


##########
test/distributed/org/apache/cassandra/distributed/upgrade/AutoRepairUpgradeTest.java:
##########
@@ -0,0 +1,171 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cassandra.distributed.upgrade;
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicLong;
+
+import com.google.common.collect.ImmutableMap;
+
+import org.junit.Test;
+
+import org.apache.cassandra.distributed.UpgradeableCluster;
+import org.apache.cassandra.distributed.api.ConsistencyLevel;
+import org.apache.cassandra.distributed.api.Feature;
+import org.apache.cassandra.repair.autorepair.AutoRepairConfig;
+
+import static org.awaitility.Awaitility.await;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * Upgrade test for auto-repair verifying that it runs successfully before and 
after
+ * upgrading from 5.0 to current. The first repair round executes on 5.0 nodes
+ * (automatically during startup) and the second round after all nodes are 
upgraded.
+ *
+ * Host IDs may change across the upgrade, so the test verifies that:
+ * <ol>
+ *   <li>3 repair history entries exist before the upgrade (on 5.0)</li>
+ *   <li>3 repair history entries exist after the upgrade (on trunk)</li>
+ *   <li>All post-upgrade finish timestamps are strictly greater than
+ *       the maximum pre-upgrade finish timestamp</li>
+ * </ol>
+ *
+ * Auto-repair is started automatically during node startup via
+ * {@code StorageService.doAutoRepairSetup()} when the config is enabled.
+ * In 5.0, the JVM property {@code cassandra.autorepair.enable=true} is also 
required.
+ */
+public class AutoRepairUpgradeTest extends UpgradeTestBase
+{

Review Comment:
   ```
   ERROR [node1_MutationStage-1] 2026-03-25T07:27:48,072 
AbstractCluster.java:582 - uncaught exception in thread 
Thread[node1_MutationStage-1,5,SharedPool]
   java.lang.RuntimeException: java.lang.IllegalStateException: HintsService is 
shut down and can't accept new hints
        at 
org.apache.cassandra.service.StorageProxy$HintRunnable.run(StorageProxy.java:3266)
        at 
org.apache.cassandra.concurrent.FutureTask$2.call(FutureTask.java:124)
        at org.apache.cassandra.concurrent.FutureTask.call(FutureTask.java:61)
        at org.apache.cassandra.concurrent.FutureTask.run(FutureTask.java:71)
        at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:151)
        at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:829)
   Caused by: java.lang.IllegalStateException: HintsService is shut down and 
can't accept new hints
        at org.apache.cassandra.hints.HintsService.write(HintsService.java:190)
        at 
org.apache.cassandra.service.StorageProxy$7.runMayThrow(StorageProxy.java:3370)
        at 
org.apache.cassandra.service.StorageProxy$HintRunnable.run(StorageProxy.java:3262)
        ... 6 common frames omitted
   
   **INFO  [node1_AutoRepair-Repair-full:1] 2026-03-25T07:27:48,072 
SubstituteLogger.java:222 - INFO  [node1_AutoRepair-Repair-full:1] node1 
2026-03-25T07:27:48,072 AutoRepairUtils.java:1027 - Auto repair finished for 
6d194555-f6eb-41d0-c000-000000000001**
   
   INFO  [node1_isolatedExecutor:2] 2026-03-25T07:27:48,183 
SubstituteLogger.java:222 - ERROR 02:27:48,183 Invariant failed
   java.lang.IllegalStateException: null
        at accord.utils.Invariants.createIllegalState(Invariants.java:76)
        at accord.utils.Invariants.expect(Invariants.java:142)
        at 
org.apache.cassandra.distributed.impl.Instance.lambda$shutdown$52(Instance.java:1087)
        at org.apache.cassandra.concurrent.FutureTask.call(FutureTask.java:61)
        at org.apache.cassandra.concurrent.FutureTask.run(FutureTask.java:71)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:829)
   
   INFO  [node1_isolatedExecutor:2] 2026-03-25T07:27:48,184 
SubstituteLogger.java:222 - ERROR [node1_isolatedExecutor:2] node1 
2026-03-25T07:27:48,183 Invariants.java:56 - Invariant failed
   java.lang.IllegalStateException: null
        at accord.utils.Invariants.createIllegalState(Invariants.java:76)
        at accord.utils.Invariants.expect(Invariants.java:142)
        at 
org.apache.cassandra.distributed.impl.Instance.lambda$shutdown$52(Instance.java:1087)
        at org.apache.cassandra.concurrent.FutureTask.call(FutureTask.java:61)
        at org.apache.cassandra.concurrent.FutureTask.run(FutureTask.java:71)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:829)
   
   INFO  [node3_isolatedExecutor:2] 2026-03-25T07:27:48,202 
SubstituteLogger.java:222 - ERROR 02:27:48,202 Invariant failed
   java.lang.IllegalStateException: null
        at accord.utils.Invariants.createIllegalState(Invariants.java:76)
        at accord.utils.Invariants.expect(Invariants.java:142)
        at 
org.apache.cassandra.distributed.impl.Instance.lambda$shutdown$52(Instance.java:1087)
        at org.apache.cassandra.concurrent.FutureTask.call(FutureTask.java:61)
        at org.apache.cassandra.concurrent.FutureTask.run(FutureTask.java:71)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:829)
   
   INFO  [node2_isolatedExecutor:2] 2026-03-25T07:27:48,202 
SubstituteLogger.java:222 - ERROR 02:27:48,202 Invariant failed
   java.lang.IllegalStateException: null
        at accord.utils.Invariants.createIllegalState(Invariants.java:76)
        at accord.utils.Invariants.expect(Invariants.java:142)
        at 
org.apache.cassandra.distributed.impl.Instance.lambda$shutdown$52(Instance.java:1087)
        at org.apache.cassandra.concurrent.FutureTask.call(FutureTask.java:61)
        at org.apache.cassandra.concurrent.FutureTask.run(FutureTask.java:71)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:829)
   ```
   
   I think maybe the issue is the presence of the 
`node1_AutoRepair-Repair-full:1` thread after the test finishes



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to