>From Janhavi Tripurwar <[email protected]>:
Attention is currently required from: Janhavi Tripurwar, Murtadha Hubail.
Hello Ali Alsuliman, Anon. E. Moose #1000171, Jenkins, Murtadha Hubail,
I'd like you to reexamine a change. Please visit
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21576?usp=email
to look at the new patch set (#6).
The following approvals got outdated and were removed:
Code-Review+1 by Janhavi Tripurwar, Integration-Tests+1 by Jenkins, Verified+1
by Jenkins
Change subject: [ASTERIXDB-3593][API] Track every job of a multi-statement
request
......................................................................
[ASTERIXDB-3593][API] Track every job of a multi-statement request
- user model changes: no
- storage format changes: no
- interface changes: yes
Details:
A request carrying several statements creates one job per statement.
ClientRequest now holds a list of its jobs, in creation order, each
with its own state, plan and compile time, in place of one of each
per request that every statement overwrote.
- any job of the request authorises its own result and status
handle, so every statement's handle is fetchable, in any order,
until it is consumed or expires
- the request record is kept while any of its jobs still has a
result to fetch, so sweeping one leaves the other handles working
- deferred cleanup sweeps each job on its own, keeping the ones
whose handle went to the client
- cancel aborts only the jobs that have not reached a terminal
state, which is the job of the statement being executed; a
finished job is left alone, its results being what an outstanding
handle points at
- cancel interrupts the executing thread when there is no such job,
so the request stops instead of running the statements that remain
- the cancellable flag is cleared as each statement starts, so a
statement that cannot be cancelled refuses the cancel rather than
reporting success and stopping nothing
- a job submitted while the request is being cancelled is refused
and cancelled by its caller
- /admin/requests reports every job, as a jobs array added only when
a request has more than one, each entry carrying the fields the
single flat job block carried plus that job's plan. jobId and the
flat fields describe the first job, so they do not move from one
statement to the next
A request with one statement has one job and is unchanged.
Tests: ClientRequestTest, RequestTrackerResultSweepTest and
MultiStatementResponseTest cover cancel, the per-job plan and
compile time, the fields a job reports, and fetching each handle of
a deferred request.
Ext-ref: MB-62708
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Change-Id: I34debfac471df71034b9b29c0cc84a9dd7acac78
---
M
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/ClientRequest.java
M
asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/AbstractQueryApiServlet.java
M
asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryStatusApiServlet.java
M
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/message/ClientInfoRequestMessage.java
M
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
M
asterixdb/asterix-app/src/main/java/org/apache/asterix/utils/AsyncRequestsAPIUtil.java
M
asterixdb/asterix-app/src/test/java/org/apache/asterix/api/http/servlet/QueryCancellationServletTest.java
M
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/runtime/MultiStatementResponseTest.java
A
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/translator/ClientRequestTest.java
A
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/translator/RequestTrackerResultSweepTest.java
M
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/api/IClientRequest.java
M
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/api/IRequestTracker.java
M
asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/utils/RequestTracker.java
13 files changed, 661 insertions(+), 64 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb
refs/changes/76/21576/6
--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21576?usp=email
To unsubscribe, or for help writing mail filters, visit
https://asterix-gerrit.ics.uci.edu/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: I34debfac471df71034b9b29c0cc84a9dd7acac78
Gerrit-Change-Number: 21576
Gerrit-PatchSet: 6
Gerrit-Owner: Janhavi Tripurwar <[email protected]>
Gerrit-Reviewer: Ali Alsuliman <[email protected]>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Janhavi Tripurwar <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Murtadha Hubail <[email protected]>
Gerrit-Attention: Murtadha Hubail <[email protected]>
Gerrit-Attention: Janhavi Tripurwar <[email protected]>