Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-9873

DeploymentSynchronizer may lose updates due to uncommitted updateDate

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 7.60.0.Final
    • 7.59.0.Final
    • Persistence
    • None
    • False
    • False
    • NEW
    • NEW
    • undefined

      There are unlikely test failures at DeploymentServiceCDIImplWithSyncTest testDeploymentOfProcessesBySync and testUndeploymentOfProcessesBySync due to uncommitted changes in the updateDate of the DeploymentStore.

      The failing scenario is the following one:

      • DeploymentSynchronizer synchronize method is invoked every 3 seconds to retrieve updates of the DeploymentStore based on this named-query (getDeploymentUnitsByDate):

      select d from DeploymentStoreEntry d where d.updateDate >= :ludate

      - ludate is the syncDate calculated as current datetime before the query and stored till the next execution.

      Then, that DeploymentStore is not "visible" (not committed yet) but "skipped" by the synchronizer.

      Therefore, when committed, it would be lower than the new syncDate, being lost for the synchronizer.

      Proposal: 

      Use a margin of -1 second in the lastSync date, to retrieve overlapping intervals, looking also for DeploymentStores which have been committed (and not detected) during the previous execution.

       

              gmunozfe@redhat.com Gonzalo Muñoz Fernández
              gmunozfe@redhat.com Gonzalo Muñoz Fernández
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: