cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject svn commit: r1178012 - in /cassandra/branches/cassandra-1.0.0: CHANGES.txt src/java/org/apache/cassandra/db/HintedHandOffManager.java
Date Sat, 01 Oct 2011 15:17:28 GMT
Author: slebresne
Date: Sat Oct  1 15:17:28 2011
New Revision: 1178012

URL: http://svn.apache.org/viewvc?rev=1178012&view=rev
Log:
Don't try to deliver hints when there isn't any
patch by jbellis; reviewed by slebresne for CASSANDRA-3176

Modified:
    cassandra/branches/cassandra-1.0.0/CHANGES.txt
    cassandra/branches/cassandra-1.0.0/src/java/org/apache/cassandra/db/HintedHandOffManager.java

Modified: cassandra/branches/cassandra-1.0.0/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0.0/CHANGES.txt?rev=1178012&r1=1178011&r2=1178012&view=diff
==============================================================================
--- cassandra/branches/cassandra-1.0.0/CHANGES.txt (original)
+++ cassandra/branches/cassandra-1.0.0/CHANGES.txt Sat Oct  1 15:17:28 2011
@@ -15,6 +15,7 @@
  * ignore any CF ids sent by client for adding CF/KS (CASSANDRA-3288)
  * remove obsolete hints on first startup (CASSANDRA-3291)
  * use correct ISortedColumns for time-optimized reads (CASSANDRA-3289)
+ * don't try delivering hints if when there isn't any (CASSANDRA-3176)
 
 
 1.0.0-rc1

Modified: cassandra/branches/cassandra-1.0.0/src/java/org/apache/cassandra/db/HintedHandOffManager.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0.0/src/java/org/apache/cassandra/db/HintedHandOffManager.java?rev=1178012&r1=1178011&r2=1178012&view=diff
==============================================================================
--- cassandra/branches/cassandra-1.0.0/src/java/org/apache/cassandra/db/HintedHandOffManager.java
(original)
+++ cassandra/branches/cassandra-1.0.0/src/java/org/apache/cassandra/db/HintedHandOffManager.java
Sat Oct  1 15:17:28 2011
@@ -225,6 +225,10 @@ public class HintedHandOffManager implem
             
     private void deliverHintsToEndpoint(InetAddress endpoint) throws IOException, DigestMismatchException,
InvalidRequestException, TimeoutException, InterruptedException
     {
+        ColumnFamilyStore hintStore = Table.open(Table.SYSTEM_TABLE).getColumnFamilyStore(HINTS_CF);
+        if (hintStore.getSSTables().isEmpty())
+            return; // nothing to do, don't confuse users by logging a no-op handoff
+
         try
         {
             logger_.debug("Checking remote({}) schema before delivering hints", endpoint);
@@ -260,7 +264,6 @@ public class HintedHandOffManager implem
         ByteBuffer tokenBytes = StorageService.getPartitioner().getTokenFactory().toByteArray(token);
         DecoratedKey<?> epkey =  StorageService.getPartitioner().decorateKey(tokenBytes);
         int rowsReplayed = 0;
-        ColumnFamilyStore hintStore = Table.open(Table.SYSTEM_TABLE).getColumnFamilyStore(HINTS_CF);
         ByteBuffer startColumn = ByteBufferUtil.EMPTY_BYTE_BUFFER;
 
         delivery:
@@ -323,6 +326,7 @@ public class HintedHandOffManager implem
     */
     public void deliverHints(final InetAddress to)
     {
+        logger_.debug("deliverHints to {}", to);
         if (!queuedDeliveries.add(to))
             return;
 



Mime
View raw message