Skip to content
Permalink
Browse files
Merge branch 'cassandra-4.1' into trunk
  • Loading branch information
David Capwell committed May 10, 2022
2 parents 9584887 + 89fbb1a commit 9e49a2b21d7e7234d580df840d59a4f1e93a5ee9
Showing 3 changed files with 9 additions and 3 deletions.
@@ -2,6 +2,7 @@
* Add guardrail for ALTER TABLE ADD / DROP / REMOVE column operations (CASSANDRA-17495)
* Rename DisableFlag class to EnableFlag on guardrails (CASSANDRA-17544)
Merged from 4.1:
* Incremental repair leaks SomeRepairFailedException after switch away from flatMap (CASSANDRA-17620)
* StorageService read threshold get methods throw NullPointerException due to not handling null configs (CASSANDRA-17593)
Merged from 4.0:
Merged from 3.11:
@@ -47,6 +47,7 @@
import org.apache.cassandra.repair.messages.PrepareConsistentRequest;
import org.apache.cassandra.repair.messages.RepairMessage;
import org.apache.cassandra.service.ActiveRepairService;
import org.apache.cassandra.utils.concurrent.ImmediateFuture;

import static org.apache.cassandra.utils.Clock.Global.currentTimeMillis;

@@ -298,15 +299,15 @@ public Future<CoordinatedRepairResult> execute(Supplier<Future<CoordinatedRepair
});

// if any session failed, then fail the future
Future<CoordinatedRepairResult> onlySuccessSessionResults = repairSessionResults.map(result -> {
Future<CoordinatedRepairResult> onlySuccessSessionResults = repairSessionResults.flatMap(result -> {
finalizeStart = currentTimeMillis();
if (result.hasFailed())
{
if (logger.isDebugEnabled())
logger.debug("Incremental repair {} validation/stream phase completed in {}", sessionID, formatDuration(repairStart, finalizeStart));
throw SomeRepairFailedException.INSTANCE;
return ImmediateFuture.failure(SomeRepairFailedException.INSTANCE);
}
return result;
return ImmediateFuture.success(result);
});

// mark propose finalization and commit
@@ -129,6 +129,10 @@ public void testRemoteSyncFailure() throws Exception
assertEquals(0, parents.intValue());
Integer sessions = cluster.get(1).callOnInstance(() -> ActiveRepairService.instance.sessionCount());
assertEquals(0, sessions.intValue());

cluster.forEach(i -> Assertions.assertThat(i.logs().grep("SomeRepairFailedException").getResult())
.describedAs("node%d logged hidden exception org.apache.cassandra.repair.SomeRepairFailedException", i.config().num())
.isEmpty());
}
}

0 comments on commit 9e49a2b

Please sign in to comment.