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

Slice.isEmpty() returns false for some empty slices

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: 3.0.13, 3.11.0
    • Component/s: None
    • Labels:
      None
    • Severity:
      Normal

      Description

      Slice.isEmpty is currently defined as comparator.compare(end, start) < 0 but this shouldn't be a strict inequality. Indeed, the way Slice.Bound is defined, having a start equal to an end implies a range like [1, 1), but that range is definitively empty and something we shouldn't let in as that would break merging and other range tombstone related code.

      In practice, if you can currently insert such empty range (with something like DELETE FROM t WHERE k = 'foo' AND i >= 1 AND i < 1), and that can trigger assertions in RangeTomstoneList (and possibly other problem).

        Attachments

          Activity

            People

            • Assignee:
              slebresne Sylvain Lebresne
              Reporter:
              slebresne Sylvain Lebresne
              Authors:
              Sylvain Lebresne
              Reviewers:
              Branimir Lambov
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: