Fix ClassCastException processing expired messages

patch by Jason Brown; reviewed by tjake for CASSANDRA-7496
This commit is contained in:
Jonathan Ellis 2014-07-07 00:03:18 -05:00
parent 9b539f966f
commit 48ff36a457
3 changed files with 12 additions and 9 deletions

View File

@ -1,4 +1,5 @@
2.1.0 2.1.0
* Fix ClassCastException processing expired messages (CASSANDRA-7496)
* Fix prepared marker for collections inside UDT (CASSANDRA-7472) * Fix prepared marker for collections inside UDT (CASSANDRA-7472)
* Remove left-over populate_io_cache_on_flush and replicate_on_write * Remove left-over populate_io_cache_on_flush and replicate_on_write
uses (CASSANDRA-7493) uses (CASSANDRA-7493)

View File

@ -9,3 +9,5 @@ Optional configuration files
============================ ============================
cassandra-topology.properties: used by PropertyFileSnitch cassandra-topology.properties: used by PropertyFileSnitch

View File

@ -349,19 +349,19 @@ public final class MessagingService implements MessagingServiceMBean
}); });
} }
Mutation mutation = (Mutation) ((WriteCallbackInfo) expiredCallbackInfo).sentMessage.payload; if (expiredCallbackInfo.shouldHint())
try
{ {
if (expiredCallbackInfo.shouldHint()) Mutation mutation = (Mutation) ((WriteCallbackInfo) expiredCallbackInfo).sentMessage.payload;
try
{ {
return StorageProxy.submitHint(mutation, expiredCallbackInfo.target, null); return StorageProxy.submitHint(mutation, expiredCallbackInfo.target, null);
} }
} finally
finally {
{ //We serialized a hint so we don't need this mutation anymore
//We serialized a hint so we don't need this mutation anymore mutation.release();
mutation.release(); }
} }
return null; return null;