To cancel a Hyperscale Job while the execution is running, the /executions/{id}/cancel endpoint of JobExecution API can be used. Here {id} is the Hyperscale Execution Id that needs to be cancelled.
Hyperscale Job cancellation is an async process. The progress of Job cancellation can be tracked by checking the Execution Status using GET /execution/{id}/summary API endpoint. As the cancellation process starts for a Hyperscale execution, the Execution Status becomes CANCEL_INITIATED. Whenever the cancellation process completes for the Execution, the Execution Status gets updated to CANCELLED.
During cancellation, the Hyperscale application stops the processes running on hyperscale with respect to that execution and closes the database connections made with the target database.
Hyperscale doesn’t stop any running processes on the target database. Hyperscale Job cancellation might leave the target database in an inconsistent state.