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

Large cartesian produces in IN queries cause the server to run out of memory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Normal
    • Resolution: Unresolved
    • None
    • CQL/Interpreter
    • None
    • Degradation - Resource Management
    • Low
    • Normal
    • User Report
    • All
    • None

    Description

      The queries

       

          create table tab (pk1 int, pk2 int, pk3 int, pk4 int, pk5 int, pk6 int, pk7 int, pk8 int, pk9 int, primary key((pk1, pk2, pk3, pk4, pk5, pk6, pk7, pk8, pk9)));

       

          select * from tab where pk1 in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) and pk2 in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) and pk3 in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) and pk4 in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) and pk5 in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) and pk6 in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) and pk7 in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) and pk8 in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) and pk9 in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10); 

       

      Will cause the server to enter a garbage collection spiral from which it does not recover. The queries generate a large (1 billion row) cartesian product which the server presumably materializes in memory, and fails.

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            avi.kivity Avi Kivity
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated: