Csaba Ringhofer has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/22738 )

Change subject: IMPALA-915: Cancel catalog ops for queries
......................................................................


Patch Set 12:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/22738/12//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/22738/12//COMMIT_MSG@9
PS12, Line 9: Adds support to cancel metadata operations with catalogd by 
sending a
            : Cancel request to catalogd for the relevant query ID. Registers 
Java
            : Threads executing select catalog operations by their query ID.
I am trying to understand what happens when a cancellation happens while the 
table is loaded. Can't this leave the table in an inconsistent state or lead to 
invalidating the table?

Also, this relies on using only a single thread per query on the catalog side, 
right? It may make sense to change this in the future, e.g. initiate multiple 
table loads in parallel.


http://gerrit.cloudera.org:8080/#/c/22738/12/be/src/service/client-request-state.cc
File be/src/service/client-request-state.cc:

http://gerrit.cloudera.org:8080/#/c/22738/12/be/src/service/client-request-state.cc@1551
PS12, Line 1551:   // Stop catalog operations on catalogd first since comms 
happen in the backend.
Can't this lead to sending the cancel too early? For example:
1. planning is running, but no call to catalogd yet
2. cancel arrives to coordinator, calling cancel in catalogd
3. planner call catalogd to fetch table data
4. cancelling planner

Will this cancel the catalog operation started in 3?

It could help to mark the query cancelled and avoid sending new RPCs for the 
same query to the catalog, but this still wouldn't be perfect, as it is 
possible that the RPC started earlier, but the cancellation took over.



--
To view, visit http://gerrit.cloudera.org:8080/22738
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iab22855bd2d63b64da008b52aa33230a6f422537
Gerrit-Change-Number: 22738
Gerrit-PatchSet: 12
Gerrit-Owner: Michael Smith <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Jason Fehr <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Riza Suminto <[email protected]>
Gerrit-Comment-Date: Wed, 09 Jul 2025 13:56:11 +0000
Gerrit-HasComments: Yes

Reply via email to