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

Slice.isEmpty() returns false for some empty slices

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 3.0.13, 3.11.0
    • None
    • None
    • 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

            slebresne Sylvain Lebresne
            slebresne Sylvain Lebresne
            Sylvain Lebresne
            Branimir Lambov
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: