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

Counter mutation lock timeout prints ugly exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Low
    • Resolution: Unresolved
    • None
    • Legacy/Coordination
    • None
    • Low

    Description

      If the coordinator is a replica of the counter shard, the StorageProxy counter write is submitted to the counter mutation stage.

      In case the write times out because it cannot acquire the lock, the StorageProxy sends a WriteTimeout to the client, but the DroppableRunnable also throws an uncaught exception that is printed in the logs:

      WARN [SharedPool-Worker-55] 2015-12-03 02:53:53,086 AbstractTracingAwareExecutorService.java:169 - Uncaught exception on thread Thread[SharedPool-Worker-55,5,main]: {} 
      java.lang.RuntimeException: org.apache.cassandra.exceptions.WriteTimeoutException: Operation timed out - received only 0 responses.
      at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2191) ~[cassandra-all-2.1.8.689.jar:2.1.8.689] 
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_60] 
      at org.apache.cassandra.concurrent.AbstractTracingAwareExecutorService$FutureTask.run(AbstractTracingAwareExecutorService.java:164) ~[cassandra-all-2.1.8.689.jar:2.1.8.689] 
      at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105) [cassandra-all-2.1.8.689.jar:2.1.8.689] 
      at java.lang.Thread.run(Thread.java:745) [na:1.8.0_60] 
      Caused by: org.apache.cassandra.exceptions.WriteTimeoutException: Operation timed out - received only 0 responses. 
      at org.apache.cassandra.db.CounterMutation.grabCounterLocks(CounterMutation.java:146) ~[cassandra-all-2.1.8.689.jar:2.1.8.689] 
      at org.apache.cassandra.db.CounterMutation.apply(CounterMutation.java:122) ~[cassandra-all-2.1.8.689.jar:2.1.8.689] 
      at org.apache.cassandra.service.StorageProxy$8.runMayThrow(StorageProxy.java:1152) ~[cassandra-all-2.1.8.689.jar:2.1.8.689] 
      at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2188) ~[cassandra-all-2.1.8.689.jar:2.1.8.689]
      

      We should probably supress the exception and log a dropped counter mutation.

      Attachments

        Activity

          People

            Unassigned Unassigned
            pauloricardomg Paulo Motta
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: