cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject git commit: rename SSTR.markCompacted -> markObsolete to disambiguate with the compacting status in DataTracker
Date Tue, 16 Apr 2013 17:11:44 GMT
Updated Branches:
  refs/heads/trunk 35ef47ec0 -> 57e51b4bd


rename SSTR.markCompacted -> markObsolete to disambiguate with the compacting status in
DataTracker


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/57e51b4b
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/57e51b4b
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/57e51b4b

Branch: refs/heads/trunk
Commit: 57e51b4bd99173fde8656b902900c5a251853806
Parents: 35ef47e
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Tue Apr 16 12:11:40 2013 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Tue Apr 16 12:11:40 2013 -0500

----------------------------------------------------------------------
 src/java/org/apache/cassandra/db/DataTracker.java  |    4 ++--
 .../cassandra/db/compaction/CompactionTask.java    |    2 +-
 .../apache/cassandra/io/sstable/SSTableReader.java |    5 +++--
 .../apache/cassandra/tools/StandaloneScrubber.java |    2 +-
 4 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/57e51b4b/src/java/org/apache/cassandra/db/DataTracker.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/DataTracker.java b/src/java/org/apache/cassandra/db/DataTracker.java
index 27c0480..311099d 100644
--- a/src/java/org/apache/cassandra/db/DataTracker.java
+++ b/src/java/org/apache/cassandra/db/DataTracker.java
@@ -212,7 +212,7 @@ public class DataTracker
             // A "good enough" approach is to mark the sstables involved compacted, which
if compaction succeeded
             // is harmlessly redundant, and if it failed ensures that at least the sstable
will get deleted on restart.
             for (SSTableReader sstable : unmark)
-                sstable.markCompacted();
+                sstable.markObsolete();
         }
 
         View currentView, newView;
@@ -364,7 +364,7 @@ public class DataTracker
             long size = sstable.bytesOnDisk();
             StorageMetrics.load.dec(size);
             cfstore.metric.liveDiskSpaceUsed.dec(size);
-            boolean firstToCompact = sstable.markCompacted();
+            boolean firstToCompact = sstable.markObsolete();
             assert firstToCompact : sstable + " was already marked compacted";
             sstable.releaseReference();
         }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/57e51b4b/src/java/org/apache/cassandra/db/compaction/CompactionTask.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionTask.java b/src/java/org/apache/cassandra/db/compaction/CompactionTask.java
index 8c4a102..e7e0ec6 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionTask.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionTask.java
@@ -213,7 +213,7 @@ public class CompactionTask extends AbstractCompactionTask
             // also remove already completed SSTables
             for (SSTableReader sstable : sstables)
             {
-                sstable.markCompacted();
+                sstable.markObsolete();
                 sstable.releaseReference();
             }
             throw Throwables.propagate(t);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/57e51b4b/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableReader.java b/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
index 1d07fea..153729d 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
@@ -964,14 +964,15 @@ public class SSTableReader extends SSTable
     }
 
     /**
-     * Mark the sstable as compacted.
+     * Mark the sstable as obsolete, i.e., compacted into newer sstables.
+     *
      * When calling this function, the caller must ensure that the SSTableReader is not referenced
anywhere
      * except for threads holding a reference.
      *
      * @return true if the this is the first time the file was marked compacted.  With rare
exceptions
      * (see DataTracker.unmarkCompacted) calling this multiple times would be buggy.
      */
-    public boolean markCompacted()
+    public boolean markObsolete()
     {
         if (logger.isDebugEnabled())
             logger.debug("Marking " + getFilename() + " compacted");

http://git-wip-us.apache.org/repos/asf/cassandra/blob/57e51b4b/src/java/org/apache/cassandra/tools/StandaloneScrubber.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/StandaloneScrubber.java b/src/java/org/apache/cassandra/tools/StandaloneScrubber.java
index 0542756..34a8a72 100644
--- a/src/java/org/apache/cassandra/tools/StandaloneScrubber.java
+++ b/src/java/org/apache/cassandra/tools/StandaloneScrubber.java
@@ -141,7 +141,7 @@ public class StandaloneScrubber
                         }
 
                         // Remove the sstable (it's been copied by scrub and snapshotted)
-                        sstable.markCompacted();
+                        sstable.markObsolete();
                         sstable.releaseReference();
                     }
                     catch (Exception e)


Mime
View raw message