mirror of https://github.com/apache/cassandra
Reject incremental repair requests combined with subrange repair
Patch by Ariel Weisberg; reviewed by marcuse for CASSANDRA-10422
This commit is contained in:
parent
7e056fa270
commit
a8e8a67306
|
|
@ -1,4 +1,5 @@
|
|||
2.1.12
|
||||
* Reject incremental repair with subrange repair (CASSANDRA-10422)
|
||||
* Add a nodetool command to refresh size_estimates (CASSANDRA-9579)
|
||||
* Shutdown compaction in drain to prevent leak (CASSANDRA-10079)
|
||||
* Invalidate cache after stream receive task is completed (CASSANDRA-10341)
|
||||
|
|
|
|||
|
|
@ -2830,6 +2830,9 @@ public class StorageService extends NotificationBroadcasterSupport implements IE
|
|||
|
||||
public int forceRepairRangeAsync(String beginToken, String endToken, String keyspaceName, boolean isSequential, boolean isLocal, boolean fullRepair, String... columnFamilies)
|
||||
{
|
||||
if (!fullRepair)
|
||||
throw new IllegalArgumentException("Incremental repair can't be requested with subrange repair because " +
|
||||
"each subrange repair would generate an anti-compacted table");
|
||||
Collection<Range<Token>> repairingRange = createRepairRangeFrom(beginToken, endToken);
|
||||
|
||||
logger.info("starting user-requested repair of range {} for keyspace {} and column families {}",
|
||||
|
|
|
|||
|
|
@ -508,4 +508,10 @@ public class StorageServiceServerTest
|
|||
repairRangeFrom = StorageService.instance.createRepairRangeFrom("2000", "2000");
|
||||
assert repairRangeFrom.size() == 0;
|
||||
}
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
public void testIncrementalRepairWithSubrangesThrows() throws Exception
|
||||
{
|
||||
StorageService.instance.forceRepairRangeAsync("", "", "", true, true, false, "");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue