Cayenne
  1. Cayenne
  2. CAY-1700

Split long DISJOINT_BY_ID prefetch query on several smaller queries

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1B1
    • Fix Version/s: 3.1B1
    • Component/s: Core Library
    • Labels:
      None

      Description

      It is improvement for CAY-1681. From Andrus' comment:
      And one more thing we will probably have to implement - breaking down OR query if it gets too long. This is a real problem which has been repeatedly mentioned in the context of the paginated queries, and in fact solved in IncrementalFaultList. see IncrementalFaultList.resolveInterval - it checks the number of clauses in the qualifier against 'maxFetchSize'. We may need to make "maxFetchSize" a container property used by IncrementalFaultList as well as our prefetch strategy, and take it into account in the later.

      1. CAY-1700.patch
        21 kB
        Andrei Veprev
      2. CAY-1700-typo.patch
        8 kB
        Andrei Veprev

        Activity

        Hide
        Andrus Adamchik added a comment -

        Ah, good catch. thanks for spotting and fixing this. Just applied the patch.

        Show
        Andrus Adamchik added a comment - Ah, good catch. thanks for spotting and fixing this. Just applied the patch.
        Hide
        Andrei Veprev added a comment -

        Typo definitely doesn't look good in public methods

        Show
        Andrei Veprev added a comment - Typo definitely doesn't look good in public methods
        Hide
        Andrus Adamchik added a comment -

        Patch applied. I did some refactoring for DataDomain to avoid reading the property value every time from RuntimeProperties (it appears that injection of RuntimeProperties into deeper runtime objects is an antipattern creating close copupling between configuration and runtime).

        Instead introduced an ivar in DataDomain. Among other things this solved the issue of unit tests setting a static System property. Now we can simply do it per test:

        runtime.getDataDomain().setMaxIdQualifierSite(100);

        Show
        Andrus Adamchik added a comment - Patch applied. I did some refactoring for DataDomain to avoid reading the property value every time from RuntimeProperties (it appears that injection of RuntimeProperties into deeper runtime objects is an antipattern creating close copupling between configuration and runtime). Instead introduced an ivar in DataDomain. Among other things this solved the issue of unit tests setting a static System property. Now we can simply do it per test: runtime.getDataDomain().setMaxIdQualifierSite(100);
        Hide
        Andrei Veprev added a comment -

        I have one controversial think in tests:
        static

        { System.setProperty(Constants.SERVER_MAX_ID_QUALIFIER_SIZE_PROPERTY, "100"); }

        I'm setting here a property directly instead of overriding ServerModule in some way. Not sure is a good move. Can you comment it?

        Show
        Andrei Veprev added a comment - I have one controversial think in tests: static { System.setProperty(Constants.SERVER_MAX_ID_QUALIFIER_SIZE_PROPERTY, "100"); } I'm setting here a property directly instead of overriding ServerModule in some way. Not sure is a good move. Can you comment it?
        Hide
        Andrei Veprev added a comment -

        Patch:

        • implemented split of queries
        • using special property to define max number of qualifiers per query
        • changed IncrementalFaultList to use the same property

        Consider to change javadoc for property if it isn't written good.

        Show
        Andrei Veprev added a comment - Patch: implemented split of queries using special property to define max number of qualifiers per query changed IncrementalFaultList to use the same property Consider to change javadoc for property if it isn't written good.

          People

          • Assignee:
            Unassigned
            Reporter:
            Andrei Veprev
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development