This is an automated email from the ASF dual-hosted git repository. stigahuang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/impala.git
commit 2750ce59d2e0d0d52f791792d5316face3bbab08 Author: ttttttz <[email protected]> AuthorDate: Thu Apr 20 10:04:39 2023 +0800 IMPALA-12073: Avoid catalogd exceptions caused by topic_update_tbl_max_wait_time_ms being set to 1 When we set topic_update_tbl_max_wait_time_ms to 1, the topic update thread will not work. Because this would cause the timeout parameter to fail the validity check in the CatalogServiceCatalog#tryLock() method. This patch avoids this problem by allowing the timeout parameter to be 0. Change-Id: I082c55e45e12f80738b090b8b6157a996b57002a Reviewed-on: http://gerrit.cloudera.org:8080/19774 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Quanlong Huang <[email protected]> --- fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java b/fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java index 96465f69a..c16ba3ac7 100644 --- a/fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java +++ b/fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java @@ -497,7 +497,7 @@ public class CatalogServiceCatalog extends Catalog { * {@link CatalogServiceCatalog#tryWriteLock(Table)} but with a custom timeout. */ public boolean tryLock(Table tbl, final boolean useWriteLock, final long timeout) { - Preconditions.checkArgument(timeout > 0); + Preconditions.checkArgument(timeout >= 0); try (ThreadNameAnnotator tna = new ThreadNameAnnotator( String.format("Attempting to %s lock table %s with a timeout of %s ms", (useWriteLock ? "write" : "read"), tbl.getFullName(), timeout))) {
