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

QueryProcessor never removes internal statements from its cache

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: 2.1.3
    • Component/s: None
    • Labels:
    • Severity:
      Normal
    • Since Version:

      Description

      QueryProcessor holds a reference to internalStatements, a map for prepared statements used internally.

      Those commands don't mix with the ones created by the user, but the problem is that if a KS/CF is dropped and then recreated internalStatements entries will point to invalid PreparedStatements (old cf_id) so any operation on those statements will fail thereafter. In fact, as of today, this map is never actually cleaned, no matter what.

      This problem is similar to the ones addressed by https://issues.apache.org/jira/browse/CASSANDRA-8652 and https://issues.apache.org/jira/browse/CASSANDRA-7566, so those issues provide any further context.

      I am attaching a patch to this issue.

        Attachments

        1. qp-internal.patch
          2 kB
          Edward Ribeiro

          Activity

            People

            • Assignee:
              eribeiro Edward Ribeiro
              Reporter:
              eribeiro Edward Ribeiro
              Authors:
              Edward Ribeiro
              Reviewers:
              Tom Hobbs
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: