-
Type: Improvement
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Component/s: Bulk
-
Tags:
-
Team:PLATFORM
-
Sprint:nxplatform #103, nxplatform #104
-
Story Points:5
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)