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

MemoryOutputStream overflow on large bloom filter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 4.0-beta1, 4.0
    • Local/SSTable
    • None

    Description

      Since CASSANDRA-9067, Cassandra will use MemoryOutputStream to reconstruct BF Memory without re-ordering bytes, see OffsetBitSet#deserialize. But MemoryOutputStream use INT to track position and will overflow when BF size exceeds 2GB.

      stacktrace
      error: Illegal bounds [-2147483648..-2147483584); size: 4588588016
      -- StackTrace --
      java.lang.AssertionError: Illegal bounds [-2147483648..-2147483584); size: 4588588016
      	at org.apache.cassandra.io.util.Memory.checkBounds(Memory.java:185)
      	at org.apache.cassandra.io.util.Memory.setBytes(Memory.java:138)
      	at org.apache.cassandra.io.util.MemoryOutputStream.write(MemoryOutputStream.java:45)
      

      Attachments

        Issue Links

          Activity

            People

              jasonstack Zhao Yang
              jasonstack Zhao Yang
              Zhao Yang
              Brandon Williams
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m