aweisberg commented on code in PR #4692:
URL: https://github.com/apache/cassandra/pull/4692#discussion_r3095830932
##########
src/java/org/apache/cassandra/db/compaction/CompactionManager.java:
##########
@@ -789,12 +802,31 @@ public AllSSTableOpStatus performCleanup(final
ColumnFamilyStore cfStore, int jo
if (partitioner.getClass() == LocalPartitioner.class)
localWrites = RangesAtEndpoint.of(Replica.fullReplica(local, new
Range<>(partitioner.getMinimumToken(), partitioner.getMinimumToken())));
- final Set<Range<Token>> allRanges = new
HashSet<>(localWrites.ranges());
+ Set<Range<Token>> noLongerOwnedRangesInUseByAccord = new HashSet<>();
+ if (AccordService.isSetup())
+ {
+ if (!localWrites.onlyTransient().ranges().isEmpty())
+ {
+ logger.error("Transient replication is not supported for
Accord");
+ return AllSSTableOpStatus.ABORTED;
+ }
+
+ if
(AccordService.instance().getInUseRanges().containsKey(cfStore.getTableId()))
+ {
+ Set<Range<Token>> accordOwnedRanges =
AccordService.instance().getInUseRanges().get(cfStore.getTableId());
+ for (Range<Token> range : accordOwnedRanges)
+
noLongerOwnedRangesInUseByAccord.addAll(range.subtractAll(localWrites.ranges()));
+ }
+ }
+
+ final Set<Range<Token>> allRanges =
Stream.concat(localWrites.ranges().stream(),
noLongerOwnedRangesInUseByAccord.stream()).collect(Collectors.toSet());
final Set<Range<Token>> transientRanges = new
HashSet<>(localWrites.onlyTransient().ranges());
final Set<Range<Token>> fullRanges = new
HashSet<>(localWrites.onlyFull().ranges());
return parallelAllSSTableOperation(cfStore, new OneSSTableOperation()
{
+ boolean incompleteOperation = false;
+
@Override
public Iterable<SSTableReader> filterSSTables(LifecycleTransaction
transaction)
Review Comment:
This was incorrect
--
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]