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

Prepared statements cache computation improvements

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 4.0.15, 4.1.8, 5.0.3, 5.1
    • Legacy/CQL
    • None

    Description

      Currently prepared statements size are computed twice which is duplicate effort:

      But we also get the side effect of that 'slow' computation locking the underlying ConcurrentHashMap. We've had nodes becoming unresponsively slow for hours with hundreds of threads in jstack all queued up behind computeIfAbsent operations on cache insertion/eviction collisions.

      Computing size only once and pulling that value instead of recomputing it on cache insertion was the solution

      Attachments

        1. screenshot-1.png
          48 kB
          Berenguer Blasi

        Activity

          People

            bereng Berenguer Blasi
            bereng Berenguer Blasi
            Berenguer Blasi
            Maxwell Guo, Stefan Miklosovic
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: