Uploaded image for project: 'Crucible'
  1. Crucible
  2. CRUC-7064

Queries with IN clauses not cached properly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 3.7.0
    • 3.0.0
    • None
    • None

    Description

      For queries with an IN clause we use HqlBatchedInClauseHelper that splits the query into a number of queries, where each subquery's in clause is limited to a number of items (100 by default), to better support certain DBMSes which have trouble with large IN clauses.

      The subqueries generated by HqlBatchedInClauseHelper are then iterated, which can be problematic if the base query is expected to be cached. The iterated queries don't go through Hibernate's query cache, potentially causing them to be executed a bunch of times.

      This affects a few areas of the application, notably checking project permissions.

      Attachments

        Issue Links

          Activity

            People

              lpater Lukasz Pater
              lpater Lukasz Pater
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 1.4h
                  1.4h