add tmp flag to Descriptor hashcode patch by Boris Yen; reviewed by jbellis for CASSANDRA-4021
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c688125b Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c688125b Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c688125b Branch: refs/heads/trunk Commit: c688125ba895c47ad04cb048187e162c4105892a Parents: e4b3d40 Author: Jonathan Ellis <[email protected]> Authored: Mon Mar 11 18:13:57 2013 -0500 Committer: Jonathan Ellis <[email protected]> Committed: Wed Mar 13 13:33:59 2013 -0500 ---------------------------------------------------------------------- CHANGES.txt | 1 + .../apache/cassandra/io/sstable/Descriptor.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/c688125b/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index d249806..6472974 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -21,6 +21,7 @@ * Relax CL for auth queries for non-default users (CASSANDRA-5310) * Fix AssertionError during repair (CASSANDRA-5245) Merged from 1.1: + * add tmp flag to Descriptor hashcode (CASSANDRA-4021) * fix logging of "Found table data in data directories" when only system tables are present (CASSANDRA-5289) * cli: Add JMX authentication support (CASSANDRA-5080) http://git-wip-us.apache.org/repos/asf/cassandra/blob/c688125b/src/java/org/apache/cassandra/io/sstable/Descriptor.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/io/sstable/Descriptor.java b/src/java/org/apache/cassandra/io/sstable/Descriptor.java index cf1907e..f0709d8 100644 --- a/src/java/org/apache/cassandra/io/sstable/Descriptor.java +++ b/src/java/org/apache/cassandra/io/sstable/Descriptor.java @@ -197,7 +197,7 @@ public class Descriptor this.cfname = cfname; this.generation = generation; temporary = temp; - hashCode = Objects.hashCode(directory, generation, ksname, cfname); + hashCode = Objects.hashCode(directory, generation, ksname, cfname, temp); } public Descriptor withGeneration(int newGeneration) @@ -328,7 +328,7 @@ public class Descriptor if (!(o instanceof Descriptor)) return false; Descriptor that = (Descriptor)o; - return that.directory.equals(this.directory) && that.generation == this.generation && that.ksname.equals(this.ksname) && that.cfname.equals(this.cfname); + return that.directory.equals(this.directory) && that.generation == this.generation && that.ksname.equals(this.ksname) && that.cfname.equals(this.cfname) && that.temporary == this.temporary; } @Override
