[ 
https://issues.apache.org/jira/browse/CASSANDRA-7852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14187469#comment-14187469
 ] 

Yuki Morishita commented on CASSANDRA-7852:
-------------------------------------------

[~krummas] I haven't looked through the whole patch, but I'm keeping on getting 
AssertionError from SSTableRewriterTest.

{code}
java.lang.AssertionError: 
Expected :95372827
Actual   :95372911
        at 
org.apache.cassandra.io.sstable.SSTableRewriterTest.testNumberOfFilesAndSizes(SSTableRewriterTest.java:173)
{cpde}

Which points to,

{code}
assertEquals(s.bytesOnDisk(), cfs.metric.totalDiskSpaceUsed.count());
{code}

If you indivisually run testNumberOfFilesAndSizes, it passes, so I suspected 
some left over from previous test.

Turns out, there is a bug in decrementing totalDiskSpaceUsed. It is decremented 
in SSTableDeletionTask with the size calculated at the *beginning* of 
SSTableReader creation. This does not includes the size of saved summary file 
which is possibly created after instantiation.

I will file a issue and continue reviewing this ticket.

> Refactor/document how we track live size
> ----------------------------------------
>
>                 Key: CASSANDRA-7852
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7852
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Marcus Eriksson
>            Assignee: Marcus Eriksson
>            Priority: Minor
>             Fix For: 2.1.2
>
>
> The way we track live size of sstables etc is a bit confusing after we 
> introduced SSTableRewriter, we should probably try to refactor or atleast 
> document this



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to