Zoltan Borok-Nagy has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/18289 )

Change subject: IMPALA-11153: Make lock wait time configurable for the users
......................................................................


Patch Set 10:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/18289/10/common/thrift/Query.thrift
File common/thrift/Query.thrift:

http://gerrit.cloudera.org:8080/#/c/18289/10/common/thrift/Query.thrift@593
PS10, Line 593: 300
> I think this should be 30
Yeah, sorry, I didn't mention it in the comment message (until now), but I 
decided to increase the total lock wait time, as 30 seconds was too short in 
practice.


http://gerrit.cloudera.org:8080/#/c/18289/10/fe/src/main/java/org/apache/impala/catalog/Hive3MetastoreShimBase.java
File fe/src/main/java/org/apache/impala/catalog/Hive3MetastoreShimBase.java:

http://gerrit.cloudera.org:8080/#/c/18289/10/fe/src/main/java/org/apache/impala/catalog/Hive3MetastoreShimBase.java@107
PS10, Line 107:   private static final long MAX_SLEEP_INTERVAL_MS = 30000;
> Do we need this? It is provided by the caller.
The caller provides the max total wait time. This is the sleep interval between 
'checkLock()' calls.


http://gerrit.cloudera.org:8080/#/c/18289/10/fe/src/main/java/org/apache/impala/catalog/Hive3MetastoreShimBase.java@655
PS10, Line 655:           sleepIntervalMs = Math.min(MAX_SLEEP_INTERVAL_MS,
              :                                      sleepIntervalMs * 2);
> We don't really need Math.min here, overshooting will be catched on line 64
This limits the sleep interval to 30 seconds (MAX_SLEEP_INTERVAL_MS).

At L649 we limit the sleep interval to the time left until 'timeoutTime'.

So if the user sets a very long timeout time (1 hour), then we'd sleep more 
than MAX_SLEEP_INTERVAL_MS without this Math.min().



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I055b76138dd30b2c40eedb48905cb3bade1438fc
Gerrit-Change-Number: 18289
Gerrit-PatchSet: 10
Gerrit-Owner: Zoltan Borok-Nagy <borokna...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <csringho...@cloudera.com>
Gerrit-Reviewer: Gergely Fürnstáhl <gfurnst...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <borokna...@cloudera.com>
Gerrit-Comment-Date: Mon, 04 Apr 2022 15:53:37 +0000
Gerrit-HasComments: Yes

Reply via email to