asterixdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wail Alkowaileet <wael....@gmail.com>
Subject Async query waits for job completion
Date Wed, 30 Dec 2015 06:07:13 GMT
Dears,

First, sorry for the many emails ...

I have a question about the RESTAPI. I see that Async query get blocked
until the job is completed ... is that intentional ?

if so ... this can fail a job if it takes too long (> HTTP timeout).

in QueryTranslator:
switch (resultDelivery) {
                    case ASYNC:
                        JSONArray handle = new JSONArray();
                        handle.put(jobId.getId());

handle.put(metadataProvider.getResultSetId().getId());
                        response.put("handle", handle);
                        sessionConfig.out().print(response);
                        sessionConfig.out().flush();
                        hcc.waitForCompletion(jobId); *<-- should we remove
this one ?*
                        break;

As a result, I've never seen the status as RUNNING. it's always SUCCESS or
some sort of runtime exception payload. Even for query takes multiple
seconds.

Removing waitForCompletion will need some modifications on the Result
framework interfaces to report the exceptions when query status = FAILURE
instead of throwing it to a finished HTTP session.

Before reporting a JIRA issue, is there any "internal consequences" if the
client didn't wait? I didn't see any issue from my brief testings ...
-- 

*Regards,*
Wail Alkowaileet

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message