Joe McDonnell has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/19205 )

Change subject: Long polling to avoid client side wait
......................................................................


Patch Set 6:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/19205/6//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/19205/6//COMMIT_MSG@18
PS6, Line 18:  This defaults to 100ms.
            : TODO: Decide if 100ms is reasonable.
> Maybe keep it turned off for now to avoid side effects?
I changed the default to off.

At some point, I want to turn this on by default. I think old clients wouldn't 
regress much unless they are unlucky. In the old world, the client is sitting 
in a client-side wait 100% of the time and won't notice a status change until 
they wake up. In the new world, sometimes they are in the server-side wait and 
could notice immediately. So, if the client is using 50ms sleep times and a 
100ms long polling time, 1/3rd of the time they are in a client-side sleep and 
won't notice until they wake up, but 2/3rds of the time they will notice 
immediately.


http://gerrit.cloudera.org:8080/#/c/19205/6//COMMIT_MSG@23
PS6, Line 23: For HS2, this also adds a wait for query completion for the
            : ExecStatement call. If the the query completes in this time, the
            : client can avoid a round-trip for the GetOperationStatus call.
> I don't get it how this is done. TExecuteStatementResp doesn't contain TOpe
Good point, I misread the structure and thought TStatus could work. I'll remove 
the wait in the ExecuteStatementCommon() and fix up this comment.


http://gerrit.cloudera.org:8080/#/c/19205/6/shell/impala_client.py
File shell/impala_client.py:

http://gerrit.cloudera.org:8080/#/c/19205/6/shell/impala_client.py@658
PS6, Line 658: sleep_time = min(max(elapsed * 0.01, 0.02), 1.0)
> Can't this be too frequent if the server doesn't support long poll? The for
I think I'll drop the changes to the sleep times. I think some of our steps are 
a bit awkward, but we can work on that separately from the long polling.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I72ca595c5dd8a33b936f078f7f7faa5b3f0f337d
Gerrit-Change-Number: 19205
Gerrit-PatchSet: 6
Gerrit-Owner: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Comment-Date: Sun, 11 Aug 2024 22:04:06 +0000
Gerrit-HasComments: Yes

Reply via email to