cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1152891 - /cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/StorageService.java
Date Mon, 01 Aug 2011 18:44:41 GMT
Author: jbellis
Date: Mon Aug  1 18:44:41 2011
New Revision: 1152891

URL: http://svn.apache.org/viewvc?rev=1152891&view=rev
Log:
avoid NPE when flushing in shutdown hook
patch by jbellis for CASSANDRA-2958

Modified:
    cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/StorageService.java

Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/StorageService.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/StorageService.java?rev=1152891&r1=1152890&r2=1152891&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/StorageService.java
(original)
+++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/StorageService.java
Mon Aug  1 18:44:41 2011
@@ -417,7 +417,11 @@ public class StorageService implements I
                     if (!ksm.isDurableWrites())
                     {
                         for (ColumnFamilyStore cfs : table.getColumnFamilyStores())
-                            flushes.add(cfs.forceFlush());
+                        {
+                            Future<?> future = cfs.forceFlush();
+                            if (future != null)
+                                flushes.add(future);
+                        }
                     }
                 }
                 FBUtilities.waitOnFutures(flushes);



Mime
View raw message