Skip to content

Interface to cancel running and queued sql statements#5375

Merged
dorinhogea merged 1 commit intobloomberg:mainfrom
dorinhogea:cnoncecancell
Sep 11, 2025
Merged

Interface to cancel running and queued sql statements#5375
dorinhogea merged 1 commit intobloomberg:mainfrom
dorinhogea:cnoncecancell

Conversation

@dorinhogea
Copy link
Contributor

Syntax:
exec procedure sys.cmd.cancel('all')
exec procedure sys.cmd.cancel('running')
exec procedure sys.cmd.cancel('queued')
exec procedure sys.cmd.cancel('cnonce', 'uuid') // from comdb2_connections
exec procedure sys.cmd.cancel('fp', 'uuid') // from comdb2_connections, client, sql dump, and so on

@dorinhogea dorinhogea added the WIP Work in Progress label Sep 5, 2025
Copy link

@roborivers roborivers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coding style check: Error. ⚠.
Smoke testing: Error ⚠.
Cbuild submission: Error ⚠.
Regression testing: 0/0 tests failed ⚠.

Copy link

@roborivers roborivers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coding style check: Error. ⚠.
Smoke testing: Error ⚠.
Cbuild submission: Success ✓.
Regression testing: Success ✓.

@dorinhogea dorinhogea added ready to review and removed WIP Work in Progress labels Sep 8, 2025
Copy link

@roborivers roborivers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coding style check: Error. ⚠.
Smoke testing: Error ⚠.
Cbuild submission: Success ✓.
Regression testing: 1/627 tests failed ⚠.

The first 10 failing tests are:
reco-ddlk-sql

Syntax:

exec procedure sys.cmd.cancel('all') // cancel all statements in libevent sql_evbuffers

exec procedure sys.cmd.cancel('running') // cancel all running statements

exec procedure sys.cmd.cancel('queued') // cancel all queued statements

exec procedure sys.cmd.cancel('cnonce', 'uuid') // cancel 'uuid' statement, 'uuid' provided by comdb2_connections

exec procedure sys.cmd.cancel('fp', 'uuid') // cancel all fp 'uuid' statements, fp provided by comdb2_connections.

NOTE: canceled requests will show as 'queued_canceled', and so on, in comdb2_connections
Signed-off-by: Dorin Hogea <dhogea@bloomberg.net>

struct rawnodestats *rawnodestats;

uuid_t unifieduuid; /* assigned to any statement running, used for canceling live sql */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: is it fair to say this is what other systems might refer to as a "cancellation token"?

@dorinhogea
Copy link
Contributor Author

@mponomar thank you

@dorinhogea dorinhogea merged commit 5cd3127 into bloomberg:main Sep 11, 2025
3 of 4 checks passed
@dorinhogea dorinhogea deleted the cnoncecancell branch September 11, 2025 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants