You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Zoltan Borok-Nagy (Code Review)" <ge...@cloudera.org> on 2025/09/26 14:44:30 UTC

[Impala-ASF-CR] IMPALA-14468: Don't genereate errors during InitWorkloadManagement() when everything goes fine

Zoltan Borok-Nagy has uploaded this change for review. ( http://gerrit.cloudera.org:8080/23470


Change subject: IMPALA-14468: Don't genereate errors during InitWorkloadManagement() when everything goes fine
......................................................................

IMPALA-14468: Don't genereate errors during InitWorkloadManagement() when everything goes fine

When Workload management is used first, CatalogD reports error "Table
not found: sys.impala_query_log". (also for sys.impala_query_live)

It is because during InitWorkloadManagement() we issue a ResetMetadata()
request against sys.impala_query_log to retrieve its schema version. If
the request fails with TableNotFound, we create the table. In other
words, the current initialization of workload management generates error
messages even when everything is going fine, and this can confuse users.

Instead of calling ResetMetadata() we can test the existence of the
workload management tables (sys.impala_query_log and
sys.impala_query_live) first.

Testing
 * tested manually that the error logs disappear

Change-Id: Ic7f7c92bda57d9fdc2185bf4ef8fd4f09aea0879
---
M be/src/catalog/workload-management-init.cc
1 file changed, 15 insertions(+), 15 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/70/23470/1
-- 
To view, visit http://gerrit.cloudera.org:8080/23470
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic7f7c92bda57d9fdc2185bf4ef8fd4f09aea0879
Gerrit-Change-Number: 23470
Gerrit-PatchSet: 1
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>

[Impala-ASF-CR] IMPALA-14468: Don't generate errors during InitWorkloadManagement() when everything goes fine

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23470 )

Change subject: IMPALA-14468: Don't generate errors during InitWorkloadManagement() when everything goes fine
......................................................................


Patch Set 2:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/12534/ DRY_RUN=false


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic7f7c92bda57d9fdc2185bf4ef8fd4f09aea0879
Gerrit-Change-Number: 23470
Gerrit-PatchSet: 2
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Fri, 26 Sep 2025 19:42:46 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14468: Don't generate errors during InitWorkloadManagement() when everything goes fine

Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/23470 )

Change subject: IMPALA-14468: Don't generate errors during InitWorkloadManagement() when everything goes fine
......................................................................


Patch Set 2: Code-Review+1


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic7f7c92bda57d9fdc2185bf4ef8fd4f09aea0879
Gerrit-Change-Number: 23470
Gerrit-PatchSet: 2
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Fri, 26 Sep 2025 17:40:38 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14468: Don't genereate errors during InitWorkloadManagement() when everything goes fine

Posted by "Riza Suminto (Code Review)" <ge...@cloudera.org>.
Riza Suminto has posted comments on this change. ( http://gerrit.cloudera.org:8080/23470 )

Change subject: IMPALA-14468: Don't genereate errors during InitWorkloadManagement() when everything goes fine
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/23470/1//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/23470/1//COMMIT_MSG@18
PS1, Line 18: Instead of calling ResetMetadata() we can test the existence of the
            : workload management tables (sys.impala_query_log and
            : sys.impala_query_live) first.
I'm not sure how this will interact with Catalog initialization. In HA context, we recently change the way Catalog reset and serve request through IMPALA-13850 and IMPALA-14220. And issuing RestMetadata seems the safest way to not overlap the table lookup with initial Catalog reset.

Can you also check that this new patch still work in Catalog HA?


http://gerrit.cloudera.org:8080/#/c/23470/1//COMMIT_MSG@23
PS1, Line 23:  * tested manually that the error logs disappear
How is this tested? Are you running existing unit test or manually start impala cluster with WM flag enabled?
Please try run some exiting tests like:
./tests/custom_cluster/test_workload_mgmt_init.py
./tests/custom_cluster/test_workload_mgmt_sql_details.py



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic7f7c92bda57d9fdc2185bf4ef8fd4f09aea0879
Gerrit-Change-Number: 23470
Gerrit-PatchSet: 1
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Fri, 26 Sep 2025 15:37:57 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14468: Don't generate errors during InitWorkloadManagement() when everything goes fine

Posted by "Riza Suminto (Code Review)" <ge...@cloudera.org>.
Riza Suminto has posted comments on this change. ( http://gerrit.cloudera.org:8080/23470 )

Change subject: IMPALA-14468: Don't generate errors during InitWorkloadManagement() when everything goes fine
......................................................................


Patch Set 2: Code-Review+2

(2 comments)

Thank you for testing it out.
Carry +1 from Michael.

http://gerrit.cloudera.org:8080/#/c/23470/1//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/23470/1//COMMIT_MSG@18
PS1, Line 18: Instead of calling ResetMetadata() we can test the existence of the
            : workload management tables (sys.impala_query_log and
            : sys.impala_query_live) first.
> InitWorkloadManagement() is only invoked during CatalogD startup from the a
Ack


http://gerrit.cloudera.org:8080/#/c/23470/1//COMMIT_MSG@23
PS1, Line 23:  * tested manually that the error logs disappear
> I manually ran Impala cluster with WM flags then checked the logs. Restarte
Ack



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic7f7c92bda57d9fdc2185bf4ef8fd4f09aea0879
Gerrit-Change-Number: 23470
Gerrit-PatchSet: 2
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Fri, 26 Sep 2025 17:52:48 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14468: Don't generate errors during InitWorkloadManagement() when everything goes fine

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/23470 )

Change subject: IMPALA-14468: Don't generate errors during InitWorkloadManagement() when everything goes fine
......................................................................

IMPALA-14468: Don't generate errors during InitWorkloadManagement() when everything goes fine

When Workload management is used first, CatalogD reports error "Table
not found: sys.impala_query_log". (also for sys.impala_query_live)

It is because during InitWorkloadManagement() we issue a ResetMetadata()
request against sys.impala_query_log to retrieve its schema version. If
the request fails with TableNotFound, we create the table. In other
words, the current initialization of workload management generates error
messages even when everything is going fine, and this can confuse users.

Instead of calling ResetMetadata() we can test the existence of the
workload management tables (sys.impala_query_log and
sys.impala_query_live) first.

Testing
 * tested manually that the error logs disappear

Change-Id: Ic7f7c92bda57d9fdc2185bf4ef8fd4f09aea0879
Reviewed-on: http://gerrit.cloudera.org:8080/23470
Reviewed-by: Michael Smith <mi...@cloudera.com>
Reviewed-by: Riza Suminto <ri...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
M be/src/catalog/workload-management-init.cc
1 file changed, 15 insertions(+), 15 deletions(-)

Approvals:
  Michael Smith: Looks good to me, but someone else must approve
  Riza Suminto: Looks good to me, approved
  Impala Public Jenkins: Verified

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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic7f7c92bda57d9fdc2185bf4ef8fd4f09aea0879
Gerrit-Change-Number: 23470
Gerrit-PatchSet: 3
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>

[Impala-ASF-CR] IMPALA-14468: Don't generate errors during InitWorkloadManagement() when everything goes fine

Posted by "Zoltan Borok-Nagy (Code Review)" <ge...@cloudera.org>.
Hello Riza Suminto, Michael Smith, Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/23470

to look at the new patch set (#2).

Change subject: IMPALA-14468: Don't generate errors during InitWorkloadManagement() when everything goes fine
......................................................................

IMPALA-14468: Don't generate errors during InitWorkloadManagement() when everything goes fine

When Workload management is used first, CatalogD reports error "Table
not found: sys.impala_query_log". (also for sys.impala_query_live)

It is because during InitWorkloadManagement() we issue a ResetMetadata()
request against sys.impala_query_log to retrieve its schema version. If
the request fails with TableNotFound, we create the table. In other
words, the current initialization of workload management generates error
messages even when everything is going fine, and this can confuse users.

Instead of calling ResetMetadata() we can test the existence of the
workload management tables (sys.impala_query_log and
sys.impala_query_live) first.

Testing
 * tested manually that the error logs disappear

Change-Id: Ic7f7c92bda57d9fdc2185bf4ef8fd4f09aea0879
---
M be/src/catalog/workload-management-init.cc
1 file changed, 15 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/70/23470/2
-- 
To view, visit http://gerrit.cloudera.org:8080/23470
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic7f7c92bda57d9fdc2185bf4ef8fd4f09aea0879
Gerrit-Change-Number: 23470
Gerrit-PatchSet: 2
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>

[Impala-ASF-CR] IMPALA-14468: Don't generate errors during InitWorkloadManagement() when everything goes fine

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23470 )

Change subject: IMPALA-14468: Don't generate errors during InitWorkloadManagement() when everything goes fine
......................................................................


Patch Set 2: Verified+1


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic7f7c92bda57d9fdc2185bf4ef8fd4f09aea0879
Gerrit-Change-Number: 23470
Gerrit-PatchSet: 2
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Sat, 27 Sep 2025 00:25:05 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14468: Don't genereate errors during InitWorkloadManagement() when everything goes fine

Posted by "Zoltan Borok-Nagy (Code Review)" <ge...@cloudera.org>.
Zoltan Borok-Nagy has posted comments on this change. ( http://gerrit.cloudera.org:8080/23470 )

Change subject: IMPALA-14468: Don't genereate errors during InitWorkloadManagement() when everything goes fine
......................................................................


Patch Set 1:

(3 comments)

Thanks for the comments!

http://gerrit.cloudera.org:8080/#/c/23470/1//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/23470/1//COMMIT_MSG@7
PS1, Line 7: IMPALA-14468: Don't genereate errors during InitWorkloadManagement() when everything goes fine
> typo: generate
Done


http://gerrit.cloudera.org:8080/#/c/23470/1//COMMIT_MSG@18
PS1, Line 18: Instead of calling ResetMetadata() we can test the existence of the
            : workload management tables (sys.impala_query_log and
            : sys.impala_query_live) first.
> I'm not sure how this will interact with Catalog initialization. In HA cont
InitWorkloadManagement() is only invoked during CatalogD startup from the active Catalog, from catalogd-main.cc:

 if (catalog_server.WaitCatalogReadinessForWorkloadManagement()) {
   ABORT_IF_ERROR(catalog_server.InitWorkloadManagement());
 } else {
   LOG(INFO) << "Skipping workload management initialization since catalogd HA is "
             << "enabled and this catalogd is not active";
 }

So we at least know that when InitWorkloadManagement() started, it was the active catalog. The CREATE TABLE / ALTER TABLE ADD COLUMNS statements in workload-management-init.cc all have IF NOT EXISTS clauses, so the code is somewhat prepared for the unlikely case when two CatalogDs run InitWorkloadManagement().


http://gerrit.cloudera.org:8080/#/c/23470/1//COMMIT_MSG@23
PS1, Line 23:  * tested manually that the error logs disappear
> How is this tested? Are you running existing unit test or manually start im
I manually ran Impala cluster with WM flags then checked the logs. Restarted the cluster multiple times with and without the tables existing.

The above tests pass.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic7f7c92bda57d9fdc2185bf4ef8fd4f09aea0879
Gerrit-Change-Number: 23470
Gerrit-PatchSet: 1
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Fri, 26 Sep 2025 16:53:41 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14468: Don't genereate errors during InitWorkloadManagement() when everything goes fine

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23470 )

Change subject: IMPALA-14468: Don't genereate errors during InitWorkloadManagement() when everything goes fine
......................................................................


Patch Set 1:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/20579/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic7f7c92bda57d9fdc2185bf4ef8fd4f09aea0879
Gerrit-Change-Number: 23470
Gerrit-PatchSet: 1
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Fri, 26 Sep 2025 15:09:34 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14468: Don't genereate errors during InitWorkloadManagement() when everything goes fine

Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/23470 )

Change subject: IMPALA-14468: Don't genereate errors during InitWorkloadManagement() when everything goes fine
......................................................................


Patch Set 1: Code-Review+1

(1 comment)

http://gerrit.cloudera.org:8080/#/c/23470/1//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/23470/1//COMMIT_MSG@7
PS1, Line 7: IMPALA-14468: Don't genereate errors during InitWorkloadManagement() when everything goes fine
typo: generate



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic7f7c92bda57d9fdc2185bf4ef8fd4f09aea0879
Gerrit-Change-Number: 23470
Gerrit-PatchSet: 1
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Fri, 26 Sep 2025 15:38:42 +0000
Gerrit-HasComments: Yes