[ https://issues.apache.org/jira/browse/CASSANDRA-7354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14018877#comment-14018877 ]
Aleksey Yeschenko commented on CASSANDRA-7354: ---------------------------------------------- Hypothetically, it would be so if a compaction ends w/ no sstables outputted (possible w/ hints' gc gs = 0) between getMeanColumns() and getMeanRowSize() calls. Now, I can't say that this is in fact what's happening, but it is theoretically possible, and thus should be guarded against. The metrics code looks legit for both gauges, so I really don't know what else could be behind it. The patch fixes the issue. > Divide by zero in hinted handoff > -------------------------------- > > Key: CASSANDRA-7354 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7354 > Project: Cassandra > Issue Type: Bug > Components: Core > Environment: C* 2.0.8, x86-64 ubuntu 12.04 > Reporter: Duncan Sands > Assignee: Aleksey Yeschenko > Priority: Minor > Fix For: 1.2.17, 2.0.9, 2.1.0 > > Attachments: 7354.txt > > > Got this on a node shortly after upgrading it to 2.0.8. The other node went > down and up (triggering the hinted handoff) because it was being migrated > from 2.0.7 to 2.0.8. > INFO [HintedHandoff:1] 2014-06-05 07:26:35,447 HintedHandOffManager.java > (line 344) Started hinted handoff for host: > b12e6d71-e189-4fe8-b00a-8ff2cc9848fd wit > h IP: /192.168.60.137 > ERROR [HintedHandoff:1] 2014-06-05 07:26:35,448 CassandraDaemon.java (line > 199) Exception in thread Thread[HintedHandoff:1,1,main] > java.lang.ArithmeticException: / by zero > at > org.apache.cassandra.db.HintedHandOffManager.calculatePageSize(HintedHandOffManager.java:493) > at > org.apache.cassandra.db.HintedHandOffManager.doDeliverHintsToEndpoint(HintedHandOffManager.java:351) > at > org.apache.cassandra.db.HintedHandOffManager.deliverHintsToEndpoint(HintedHandOffManager.java:330) > at > org.apache.cassandra.db.HintedHandOffManager.access$300(HintedHandOffManager.java:91) > at > org.apache.cassandra.db.HintedHandOffManager$5.run(HintedHandOffManager.java:547) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > at java.lang.Thread.run(Thread.java:744) -- This message was sent by Atlassian JIRA (v6.2#6252)