mirror of https://github.com/apache/cassandra
skip the system table (keyspace) for cleanup, it's local-only. patch by jbellis; reviewed by Stu Hood for CASSANDRA-579
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@885572 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
afda4ac49d
commit
8e08487c26
|
|
@ -4,6 +4,7 @@
|
|||
in clusters with multiple seeds (CASSANDRA-150)
|
||||
* fix NPE in get_range_slice when no data is found (CASSANDRA-578)
|
||||
* fix potential NPE in hinted handoff (CASSANDRA-585)
|
||||
* fix cleanup of local "system" keyspace (CASSANDRA-576)
|
||||
|
||||
|
||||
0.5.0 beta
|
||||
|
|
|
|||
|
|
@ -248,6 +248,9 @@ public class Table
|
|||
*/
|
||||
public void forceCleanup()
|
||||
{
|
||||
if (table_.equals("system"))
|
||||
throw new RuntimeException("Cleanup of the system table is neither necessary nor wise");
|
||||
|
||||
Set<String> columnFamilies = tableMetadata_.getColumnFamilies();
|
||||
for ( String columnFamily : columnFamilies )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -586,8 +586,10 @@ public final class StorageService implements IEndPointStateChangeSubscriber, Sto
|
|||
public void forceTableCleanup() throws IOException
|
||||
{
|
||||
List<String> tables = DatabaseDescriptor.getTables();
|
||||
for ( String tName : tables )
|
||||
for (String tName : tables)
|
||||
{
|
||||
if (tName.equals("system"))
|
||||
continue;
|
||||
Table table = Table.open(tName);
|
||||
table.forceCleanup();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue