Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-32184

Have a way to abort bulk command in a SCROLLING_RUNNING state

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2023.7, 2021.49
    • Component/s: Bulk

      Description

      Today if a bulk command contains a very slow NXQL query because of missing index, there is no way to abort the bulk command before the scroll is completed.

      Also, It is not possible to stop the computation threads using the stream management API.
      Typically you will see

      curl -XPUT "https://HOST/nuxeo/api/v1/management/stream/consumer/stop?stream=bulk/command&consumer=bulk/scroller"-u USER:PASSWORD
      -> 204
      
      In the log:
      WARN Stopping computation thread pool: Name{id='bulk-scroller', urn='bulk/scroller'}
      WARN bulk/scroller: Timeout on wait for pool termination
      
      Moving the position:
      curl -XPUT "https://HOST/nuxeo/api/v1/management/stream/consumer/position/end?stream=bulk/command&consumer=bulk/scroller"-u USER:PASSWORD
      -> 409 Conflict: Cannot change position while consumers are running
      

      The work around is to kill the query using database tool which could be ok.
      We need to make sure that the bulk command is treated as an invalid query and skipped not retried.

      Ideally we should be able to abort or stop the consumer while the query is running even if waiting from the database (not yet in the fetching result process)

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: