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

leveled compaction does less work in L0 than intended

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Fix Version/s: 1.1.6
    • Component/s: None
    • Labels:

      Description

      We have this code in the candidate loop:

      .               if (SSTable.getTotalBytes(candidates) > maxSSTableSizeInBytes)
                      {
                          // add sstables from L1 that overlap candidates
                          candidates.addAll(overlapping(candidates, generations[1]));
                          break;
                      }
      

      thus, as soon as we have enough to compact to make one L1 sstable's worth of data, we stop collecting candidates.

      1. 4778.txt
        2 kB
        Jonathan Ellis

        Activity

        Hide
        jbellis Jonathan Ellis added a comment -

        Also added a fix in f34bd79b9a92f23c1fc5e185e074d7faa880fc0b to avoid infinite compaction on a single L0 sstable that isn't large enough to promote.

        Show
        jbellis Jonathan Ellis added a comment - Also added a fix in f34bd79b9a92f23c1fc5e185e074d7faa880fc0b to avoid infinite compaction on a single L0 sstable that isn't large enough to promote.
        Hide
        jbellis Jonathan Ellis added a comment -

        committed

        Show
        jbellis Jonathan Ellis added a comment - committed
        Hide
        yukim Yuki Morishita added a comment -

        +1

        Show
        yukim Yuki Morishita added a comment - +1
        Hide
        jbellis Jonathan Ellis added a comment -

        (introduced by CASSANDRA-4341)

        Show
        jbellis Jonathan Ellis added a comment - (introduced by CASSANDRA-4341 )
        Hide
        jbellis Jonathan Ellis added a comment -

        patch to move combine-with-L1 logic outside the candidates loop

        Show
        jbellis Jonathan Ellis added a comment - patch to move combine-with-L1 logic outside the candidates loop

          People

          • Assignee:
            jbellis Jonathan Ellis
            Reporter:
            jbellis Jonathan Ellis
            Reviewer:
            Yuki Morishita
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development