Jason Fehr has posted comments on this change. ( http://gerrit.cloudera.org:8080/21059 )
Change subject: IMPALA-12426: QueryStateRecord Refactor ...................................................................... Patch Set 11: (3 comments) http://gerrit.cloudera.org:8080/#/c/21059/7//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/21059/7//COMMIT_MSG@11 PS7, Line 11: Since significant portions of this struct has data : that is also needed in workload management, it has been refactored. > That seems like a mistake, it should probably be in QueryStateExpanded. Yes, this is a holdover from my original design which was to add fields to QueryStateRecord. Field has been moved. http://gerrit.cloudera.org:8080/#/c/21059/7/be/src/service/query-state-record.h File be/src/service/query-state-record.h: http://gerrit.cloudera.org:8080/#/c/21059/7/be/src/service/query-state-record.h@230 PS7, Line 230: /// Expanded snapshot of th > I don't see any use of QueryStateExpanded in this patch. Not even in test f It's used in the next patch. The QueryStateExpanded struct is where most of the data is stored for the completed queries table. http://gerrit.cloudera.org:8080/#/c/21059/7/be/src/service/query-state-record.h@232 PS7, Line 232: struct QueryStateExpanded { : > Are both QueryStateRecord and QueryStateRecordExpanded intended to be owned QueryStateRecord is used by both the Impala web UI query history and workload management. QueryStateExpanded is only used by workload management. QueryStateExpanded is passed a shared_ptr<QueryStateRecord> by value, thus a copy of the shared pointer is made and it's internal reference count incremented. The QueryStateRecord instance is deleted once both workload management and the query history web UI are done with the QueryStateRecord and the shared pointer's reference count drops to 0. I expect the QueryStateRecord to be needed longer by workload management than the web UI. -- To view, visit http://gerrit.cloudera.org:8080/21059 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I57d470db6fea71ec12e43f86e3fd62ed6259c83a Gerrit-Change-Number: 21059 Gerrit-PatchSet: 11 Gerrit-Owner: Jason Fehr <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Jason Fehr <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Riza Suminto <[email protected]> Gerrit-Comment-Date: Wed, 28 Feb 2024 03:08:30 +0000 Gerrit-HasComments: Yes
