mirror of https://github.com/apache/cassandra
Dont mark sstables as repairing with sub range repairs
Patch by marcuse; reviewed by yukim for CASSANDRA-11451
This commit is contained in:
parent
1dac59d1e7
commit
10f25aeebb
|
|
@ -1,4 +1,5 @@
|
|||
2.2.6
|
||||
* Dont mark sstables as repairing with sub range repairs (CASSANDRA-11451)
|
||||
* Fix use of NullUpdater for 2i during compaction (CASSANDRA-11450)
|
||||
* Notify when sstables change after cancelling compaction (CASSANDRA-11373)
|
||||
* cqlsh: COPY FROM should check that explicit column names are valid (CASSANDRA-11333)
|
||||
|
|
|
|||
|
|
@ -1176,12 +1176,15 @@ public class CompactionManager implements CompactionManagerMBean
|
|||
}
|
||||
}
|
||||
|
||||
Set<SSTableReader> currentlyRepairing = ActiveRepairService.instance.currentlyRepairing(cfs.metadata.cfId, validator.desc.parentSessionId);
|
||||
|
||||
if (!Sets.intersection(currentlyRepairing, sstablesToValidate).isEmpty())
|
||||
if (prs.isGlobal)
|
||||
{
|
||||
logger.error("Cannot start multiple repair sessions over the same sstables");
|
||||
throw new RuntimeException("Cannot start multiple repair sessions over the same sstables");
|
||||
Set<SSTableReader> currentlyRepairing = ActiveRepairService.instance.currentlyRepairing(cfs.metadata.cfId, validator.desc.parentSessionId);
|
||||
|
||||
if (!Sets.intersection(currentlyRepairing, sstablesToValidate).isEmpty())
|
||||
{
|
||||
logger.error("Cannot start multiple repair sessions over the same sstables");
|
||||
throw new RuntimeException("Cannot start multiple repair sessions over the same sstables");
|
||||
}
|
||||
}
|
||||
|
||||
sstables = Refs.tryRef(sstablesToValidate);
|
||||
|
|
@ -1191,8 +1194,8 @@ public class CompactionManager implements CompactionManagerMBean
|
|||
throw new RuntimeException("Could not reference sstables");
|
||||
}
|
||||
}
|
||||
|
||||
prs.addSSTables(cfs.metadata.cfId, sstablesToValidate);
|
||||
if (prs.isGlobal)
|
||||
prs.addSSTables(cfs.metadata.cfId, sstablesToValidate);
|
||||
|
||||
return sstables;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,16 +108,18 @@ public class RepairMessageVerbHandler implements IVerbHandler<RepairMessage>
|
|||
new Bounds<>(sstable.first.getToken(), sstable.last.getToken()).intersects(Collections.singleton(repairingRange));
|
||||
}
|
||||
}, true); //ephemeral snapshot, if repair fails, it will be cleaned next startup
|
||||
|
||||
Set<SSTableReader> currentlyRepairing = ActiveRepairService.instance.currentlyRepairing(cfs.metadata.cfId, desc.parentSessionId);
|
||||
if (!Sets.intersection(currentlyRepairing, snapshottedSSSTables).isEmpty())
|
||||
if (ActiveRepairService.instance.getParentRepairSession(desc.parentSessionId).isGlobal)
|
||||
{
|
||||
// clear snapshot that we just created
|
||||
cfs.clearSnapshot(desc.sessionId.toString());
|
||||
logErrorAndSendFailureResponse("Cannot start multiple repair sessions over the same sstables", message.from, id);
|
||||
return;
|
||||
Set<SSTableReader> currentlyRepairing = ActiveRepairService.instance.currentlyRepairing(cfs.metadata.cfId, desc.parentSessionId);
|
||||
if (!Sets.intersection(currentlyRepairing, snapshottedSSSTables).isEmpty())
|
||||
{
|
||||
// clear snapshot that we just created
|
||||
cfs.clearSnapshot(desc.sessionId.toString());
|
||||
logErrorAndSendFailureResponse("Cannot start multiple repair sessions over the same sstables", message.from, id);
|
||||
return;
|
||||
}
|
||||
ActiveRepairService.instance.getParentRepairSession(desc.parentSessionId).addSSTables(cfs.metadata.cfId, snapshottedSSSTables);
|
||||
}
|
||||
ActiveRepairService.instance.getParentRepairSession(desc.parentSessionId).addSSTables(cfs.metadata.cfId, snapshottedSSSTables);
|
||||
logger.debug("Enqueuing response to snapshot request {} to {}", desc.sessionId, message.from);
|
||||
MessagingService.instance().sendReply(new MessageOut(MessagingService.Verb.INTERNAL_RESPONSE), id, message.from);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -426,7 +426,7 @@ public class ActiveRepairService
|
|||
private final Map<UUID, Set<SSTableReader>> sstableMap = new HashMap<>();
|
||||
private final long repairedAt;
|
||||
public final boolean isIncremental;
|
||||
private final boolean isGlobal;
|
||||
public final boolean isGlobal;
|
||||
|
||||
public ParentRepairSession(List<ColumnFamilyStore> columnFamilyStores, Collection<Range<Token>> ranges, boolean isIncremental, boolean isGlobal, long repairedAt)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue