merge from 1.2
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f557a777 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f557a777 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f557a777 Branch: refs/heads/trunk Commit: f557a777538b711f739d9db72aa927f983796429 Parents: fe598e7 bafb966 Author: Jonathan Ellis <[email protected]> Authored: Mon Oct 14 20:26:01 2013 +0100 Committer: Jonathan Ellis <[email protected]> Committed: Mon Oct 14 20:26:01 2013 +0100 ---------------------------------------------------------------------- CHANGES.txt | 1 + .../db/commitlog/CommitLogReplayer.java | 26 +++++++++++++++++--- 2 files changed, 23 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f557a777/CHANGES.txt ---------------------------------------------------------------------- diff --cc CHANGES.txt index 22b9f29,046ecfb..0459bfa --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -50,43 -25,10 +50,44 @@@ Merged from 1.2 * Fix indexed queries with row cache enabled on parent table (CASSANDRA-5732) * Fix compaction race during columnfamily drop (CASSANDRA-5957) * Fix validation of empty column names for compact tables (CASSANDRA-6152) + * Skip replaying mutations that pass CRC but fail to deserialize (CASSANDRA-6183) -1.2.10 +2.0.1 + * Fix bug that could allow reading deleted data temporarily (CASSANDRA-6025) + * Improve memory use defaults (CASSANDRA-5069) + * Make ThriftServer more easlly extensible (CASSANDRA-6058) + * Remove Hadoop dependency from ITransportFactory (CASSANDRA-6062) + * add file_cache_size_in_mb setting (CASSANDRA-5661) + * Improve error message when yaml contains invalid properties (CASSANDRA-5958) + * Improve leveled compaction's ability to find non-overlapping L0 compactions + to work on concurrently (CASSANDRA-5921) + * Notify indexer of columns shadowed by range tombstones (CASSANDRA-5614) + * Log Merkle tree stats (CASSANDRA-2698) + * Switch from crc32 to adler32 for compressed sstable checksums (CASSANDRA-5862) + * Improve offheap memcpy performance (CASSANDRA-5884) + * Use a range aware scanner for cleanup (CASSANDRA-2524) + * Cleanup doesn't need to inspect sstables that contain only local data + (CASSANDRA-5722) + * Add ability for CQL3 to list partition keys (CASSANDRA-4536) + * Improve native protocol serialization (CASSANDRA-5664) + * Upgrade Thrift to 0.9.1 (CASSANDRA-5923) + * Require superuser status for adding triggers (CASSANDRA-5963) + * Make standalone scrubber handle old and new style leveled manifest + (CASSANDRA-6005) + * Fix paxos bugs (CASSANDRA-6012, 6013, 6023) + * Fix paged ranges with multiple replicas (CASSANDRA-6004) + * Fix potential AssertionError during tracing (CASSANDRA-6041) + * Fix NPE in sstablesplit (CASSANDRA-6027) + * Migrate pre-2.0 key/value/column aliases to system.schema_columns + (CASSANDRA-6009) + * Paging filter empty rows too agressively (CASSANDRA-6040) + * Support variadic parameters for IN clauses (CASSANDRA-4210) + * cqlsh: return the result of CAS writes (CASSANDRA-5796) + * Fix validation of IN clauses with 2ndary indexes (CASSANDRA-6050) + * Support named bind variables in CQL (CASSANDRA-6033) +Merged from 1.2: + * Allow cache-keys-to-save to be set at runtime (CASSANDRA-5980) * Avoid second-guessing out-of-space state (CASSANDRA-5605) * Tuning knobs for dealing with large blobs and many CFs (CASSANDRA-5982) * (Hadoop) Fix CQLRW for thrift tables (CASSANDRA-6002) http://git-wip-us.apache.org/repos/asf/cassandra/blob/f557a777/src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java ---------------------------------------------------------------------- diff --cc src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java index 88e116d,934cb6a..250e516 --- a/src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java +++ b/src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java @@@ -203,7 -196,11 +200,11 @@@ public class CommitLogReplaye { // assuming version here. We've gone to lengths to make sure what gets written to the CL is in // the current version. so do make sure the CL is drained prior to upgrading a node. - rm = RowMutation.serializer.deserialize(new DataInputStream(bufIn), version, IColumnSerializer.Flag.LOCAL); + rm = RowMutation.serializer.deserialize(new DataInputStream(bufIn), version, ColumnSerializer.Flag.LOCAL); + // doublecheck that what we read is [still] valid for the current schema + for (ColumnFamily cf : rm.getColumnFamilies()) - for (IColumn cell : cf) ++ for (Column cell : cf) + cf.getComparator().validate(cell.name()); } catch (UnknownColumnFamilyException ex) { @@@ -219,9 -216,26 +220,26 @@@ i.incrementAndGet(); continue; } + catch (Throwable t) + { + File f = File.createTempFile("mutation", "dat"); + DataOutputStream out = new DataOutputStream(new FileOutputStream(f)); + try + { + out.write(buffer, 0, serializedSize); + } + finally + { + out.close(); + } + String st = String.format("Unexpected error deserializing mutation; saved to %s and ignored. This may be caused by replaying a mutation against a table with the same name but incompatible schema. Exception follows: ", + f.getAbsolutePath()); + logger.error(st, t); + continue; + } if (logger.isDebugEnabled()) - logger.debug(String.format("replaying mutation for %s.%s: %s", rm.getTable(), ByteBufferUtil.bytesToHex(rm.key()), "{" + StringUtils.join(rm.getColumnFamilies().iterator(), ", ") + logger.debug(String.format("replaying mutation for %s.%s: %s", rm.getKeyspaceName(), ByteBufferUtil.bytesToHex(rm.key()), "{" + StringUtils.join(rm.getColumnFamilies().iterator(), ", ") + "}")); final long entryLocation = reader.getFilePointer();
