Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2677

BufferingSequence.loadAll() depend on the order of batches

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 5.1.0.Final
    • Fix Version/s: 5.4.0.Final
    • Component/s: Query
    • Labels:
      None
    • Environment:

      Modeshape 5.3.0

      Description

      After updating to the latest version we were facing an ugly bug with the indices.
      After some time debugging and detect where it could come from we found the mistake.

      In commit 9db7a79 Horia Chiorean wanted to shorten the loadAll()-Method from the BufferingSequence.
      But the current code depend now on the order of batches to iterate.

      Example:
      Is the first batch empty (bacth.hasNext() == false) it wouldn't count any batchsize ever.
      Before this change, the "old" while-loop tried all batches until any found to count.

      It could be fixed easily if you change line 140 to firstBatchCounted = batchSize != 0;

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  hchiorean Horia Chiorean
                  Reporter:
                  x-out X-out portal
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: