mirror of https://github.com/apache/cassandra
merge from 1.2
This commit is contained in:
commit
cdc57b3c36
|
|
@ -85,7 +85,7 @@
|
|||
|
||||
|
||||
1.2.7
|
||||
* add cassandra.unsafetruncate property (CASSANDRA-5704)
|
||||
* add cassandra.unsafesystem property (CASSANDRA-5704)
|
||||
* (Hadoop) quote identifiers in CqlPagingRecordReader (CASSANDRA-5763)
|
||||
* Add replace_node functionality for vnodes (CASSANDRA-5337)
|
||||
* Add timeout events to query traces (CASSANDRA-5520)
|
||||
|
|
|
|||
|
|
@ -27,16 +27,18 @@ import com.google.common.collect.Maps;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.apache.cassandra.config.*;
|
||||
import org.apache.cassandra.config.CFMetaData;
|
||||
import org.apache.cassandra.config.DatabaseDescriptor;
|
||||
import org.apache.cassandra.config.KSMetaData;
|
||||
import org.apache.cassandra.config.Schema;
|
||||
import org.apache.cassandra.db.compaction.CompactionManager;
|
||||
import org.apache.cassandra.db.filter.QueryFilter;
|
||||
import org.apache.cassandra.db.marshal.AsciiType;
|
||||
import org.apache.cassandra.db.marshal.UTF8Type;
|
||||
import org.apache.cassandra.exceptions.ConfigurationException;
|
||||
import org.apache.cassandra.service.StorageService;
|
||||
import org.apache.cassandra.service.MigrationManager;
|
||||
import org.apache.cassandra.service.StorageService;
|
||||
import org.apache.cassandra.utils.ByteBufferUtil;
|
||||
import org.apache.cassandra.utils.FBUtilities;
|
||||
|
||||
/**
|
||||
* SCHEMA_{KEYSPACES, COLUMNFAMILIES, COLUMNS}_CF are used to store Keyspace/ColumnFamily attributes to make schema
|
||||
|
|
@ -458,13 +460,9 @@ public class DefsTables
|
|||
|
||||
private static void flushSchemaCFs()
|
||||
{
|
||||
flushSchemaCF(SystemKeyspace.SCHEMA_KEYSPACES_CF);
|
||||
flushSchemaCF(SystemKeyspace.SCHEMA_COLUMNFAMILIES_CF);
|
||||
flushSchemaCF(SystemKeyspace.SCHEMA_COLUMNS_CF);
|
||||
}
|
||||
|
||||
private static void flushSchemaCF(String cfName)
|
||||
{
|
||||
FBUtilities.waitOnFuture(SystemKeyspace.schemaCFS(cfName).forceFlush());
|
||||
SystemKeyspace.forceBlockingFlush(SystemKeyspace.SCHEMA_KEYSPACES_CF);
|
||||
SystemKeyspace.forceBlockingFlush(SystemKeyspace.SCHEMA_COLUMNFAMILIES_CF);
|
||||
SystemKeyspace.forceBlockingFlush(SystemKeyspace.SCHEMA_COLUMNS_CF);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import java.io.IOException;
|
|||
import java.net.InetAddress;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.collect.HashMultimap;
|
||||
|
|
@ -192,8 +193,7 @@ public class SystemKeyspace
|
|||
{
|
||||
String req = "UPDATE system.%s SET truncated_at = truncated_at + %s WHERE key = '%s'";
|
||||
processInternal(String.format(req, LOCAL_CF, truncationAsMapEntry(cfs, truncatedAt, position), LOCAL_KEY));
|
||||
if (!Boolean.getBoolean("cassandra.unsafetruncate"))
|
||||
forceBlockingFlush(LOCAL_CF);
|
||||
forceBlockingFlush(LOCAL_CF);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -361,9 +361,10 @@ public class SystemKeyspace
|
|||
return tokens;
|
||||
}
|
||||
|
||||
private static void forceBlockingFlush(String cfname)
|
||||
public static void forceBlockingFlush(String cfname)
|
||||
{
|
||||
Keyspace.open(Keyspace.SYSTEM_KS).getColumnFamilyStore(cfname).forceBlockingFlush();
|
||||
if (!Boolean.getBoolean("cassandra.unsafesystem"))
|
||||
FBUtilities.waitOnFuture(Keyspace.open(Keyspace.SYSTEM_KS).getColumnFamilyStore(cfname).forceFlush());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue