Does SonarQube Compute Engine ensure data atomicity during task cancellation?
0 reputation · 22 Sept 2021, 07:02 UTC
Compute Engine Task Cancellation Behavior
The SonarQube Compute Engine (CE) processes analysis reports asynchronously through a worker queue. When a user triggers a cancellation via the API or UI, the system marks the task status as CANCELLED in the database. However, the worker thread may not terminate instantly depending on the current execution phase.
Data Integrity Concerns
There is uncertainty regarding the behavior of the CE when a cancellation request coincides with active database commits. If the worker thread is interrupted during the persistence of analysis results, it may lead to partial data being stored in the system.
Given the asynchronous nature of the worker threads, what mechanisms are in place to prevent orphaned records or partial analysis states during a cancellation? Does the Compute Engine implement a transactional rollback for the entire analysis task upon cancellation?