cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [02/13] git commit: Fix ClassCastException processing expired messages patch by Jason Brown; reviewed by tjake for CASSANDRA-7496
Date Mon, 07 Jul 2014 05:14:06 GMT
Fix ClassCastException processing expired messages
patch by Jason Brown; reviewed by tjake for CASSANDRA-7496


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

Branch: refs/heads/trunk
Commit: 48ff36a457597a21ab0ad9ba55d849006d3bff1f
Parents: 9b539f9
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Mon Jul 7 00:03:18 2014 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Mon Jul 7 00:03:18 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                                       |  1 +
 conf/README.txt                                   |  2 ++
 .../apache/cassandra/net/MessagingService.java    | 18 +++++++++---------
 3 files changed, 12 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/48ff36a4/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 9fd3b85..aa20d84 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.0
+ * Fix ClassCastException processing expired messages (CASSANDRA-7496)
  * Fix prepared marker for collections inside UDT (CASSANDRA-7472)
  * Remove left-over populate_io_cache_on_flush and replicate_on_write
    uses (CASSANDRA-7493)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/48ff36a4/conf/README.txt
----------------------------------------------------------------------
diff --git a/conf/README.txt b/conf/README.txt
index 8e9e95a..e44d4a3 100644
--- a/conf/README.txt
+++ b/conf/README.txt
@@ -9,3 +9,5 @@ Optional configuration files
 ============================
 
 cassandra-topology.properties: used by PropertyFileSnitch
+
+

http://git-wip-us.apache.org/repos/asf/cassandra/blob/48ff36a4/src/java/org/apache/cassandra/net/MessagingService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/net/MessagingService.java b/src/java/org/apache/cassandra/net/MessagingService.java
index 9b356ae..9da247d 100644
--- a/src/java/org/apache/cassandra/net/MessagingService.java
+++ b/src/java/org/apache/cassandra/net/MessagingService.java
@@ -349,19 +349,19 @@ public final class MessagingService implements MessagingServiceMBean
                     });
                 }
 
-                Mutation mutation = (Mutation) ((WriteCallbackInfo) expiredCallbackInfo).sentMessage.payload;
-
-                try
+                if (expiredCallbackInfo.shouldHint())
                 {
-                    if (expiredCallbackInfo.shouldHint())
+                    Mutation mutation = (Mutation) ((WriteCallbackInfo) expiredCallbackInfo).sentMessage.payload;
+
+                    try
                     {
                         return StorageProxy.submitHint(mutation, expiredCallbackInfo.target,
null);
                     }
-                }
-                finally
-                {
-                    //We serialized a hint so we don't need this mutation anymore
-                    mutation.release();
+                    finally
+                    {
+                        //We serialized a hint so we don't need this mutation anymore
+                        mutation.release();
+                    }
                 }
 
                 return null;


Mime
View raw message