Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-7496

ClassCastException in MessagingService

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 2.1 rc3
    • None
    • None
    • 3 node ccm cluster running in a linux VM on my laptop

    • Normal

    Description

      Got the following exception when running repair on a 3 node ccm cluster

      ERROR [EXPIRING-MAP-REAPER:1] 2014-07-03 21:24:33,063 CassandraDaemon.java:166 - Exception in thread Thread[EXPIRING-MAP-REAPER:1,5,main]
      java.lang.ClassCastException: org.apache.cassandra.net.CallbackInfo cannot be cast to org.apache.cassandra.net.WriteCallbackInfo
      	at org.apache.cassandra.net.MessagingService$5.apply(MessagingService.java:352) ~[main/:na]
      	at org.apache.cassandra.net.MessagingService$5.apply(MessagingService.java:335) ~[main/:na]
      	at org.apache.cassandra.utils.ExpiringMap$1.run(ExpiringMap.java:98) ~[main/:na]
      	at org.apache.cassandra.concurrent.DebuggableScheduledThreadPoolExecutor$UncomplainingRunnable.run(DebuggableScheduledThreadPoolExecutor.java:75) ~[main/:na]
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_60]
      	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) [na:1.7.0_60]
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_60]
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.7.0_60]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_60]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_60]
      	at java.lang.Thread.run(Thread.java:745) [na:1.7.0_60]
      

      Looks like that block (MessagingService, li. 352), was changed with CASSANDRA-7245.

      While I produced this on trunk, I compared the MS code on trunk with 2.1.0 and it is the same. This is the change that 7245 introduced:

      pre-7245

                      if (expiredCallbackInfo.shouldHint())
                      {
                          Mutation mutation = (Mutation) ((WriteCallbackInfo) expiredCallbackInfo).sentMessage.payload;
                          return StorageProxy.submitHint(mutation, expiredCallbackInfo.target, null);
                      }
      

      7245:

                      Mutation mutation = (Mutation) ((WriteCallbackInfo) expiredCallbackInfo).sentMessage.payload;
      
                      try
                      {
                          if (expiredCallbackInfo.shouldHint())
                          {
                              return StorageProxy.submitHint(mutation, expiredCallbackInfo.target, null);
                          }
                      }
                      finally
                      {
                          //We serialized a hint so we don't need this mutation anymore
                          mutation.release();
                      }
      

      Attachments

        1. 7496.txt
          1 kB
          T Jake Luciani

        Activity

          People

            jasobrown Jason Brown
            jasobrown Jason Brown
            Jason Brown
            T Jake Luciani
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: