cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r812163 - /incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
Date Mon, 07 Sep 2009 14:45:14 GMT
Author: jbellis
Date: Mon Sep  7 14:45:13 2009
New Revision: 812163

URL: http://svn.apache.org/viewvc?rev=812163&view=rev
Log:
clean up inaccurate comments; remaining double-increment code.
patch by jbellis; reviewed by Sammy Yu for CASSANDRA-418

Modified:
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java?rev=812163&r1=812162&r2=812163&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java Mon
Sep  7 14:45:13 2009
@@ -318,11 +318,6 @@
         return Integer.parseInt(index);
     }
 
-    String getNextFileName()
-    {
-        return String.format("%s-%s-Data.db", columnFamily_, fileIndexGenerator_.incrementAndGet());
-    }
-
     /*
      * @return a temporary file name for an sstable.
      * When the sstable object is closed, it will be renamed to a non-temporary
@@ -330,15 +325,12 @@
      */
     String getTempSSTablePath()
     {
-        // increment twice so that we do not generate consecutive numbers
         String fname = getTempSSTableFileName();
         return new File(DatabaseDescriptor.getDataFileLocationForTable(table_), fname).getAbsolutePath();
     }
 
     String getTempSSTableFileName()
     {
-        fileIndexGenerator_.incrementAndGet();
-
         return String.format("%s-%s-%s-Data.db",
                              columnFamily_, SSTable.TEMPFILE_MARKER, fileIndexGenerator_.incrementAndGet());
     }



Mime
View raw message