github-actions[bot] commented on code in PR #68097: URL: https://github.com/apache/doris/pull/68097#discussion_r4037191313
########## regression-test/suites/tso_p0/test_commit_tso_reader_paths.groovy: ########## @@ -0,0 +1,101 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +suite("test_commit_tso_reader_paths", "nonConcurrent") { + sql "SET show_hidden_columns = true" + sql "SET enable_common_expr_pushdown = true" + + // Obtain the oracle without first reading the hidden column and warming its reader. + // Commit TSOs are allocated at runtime, so compare against rowset metadata instead of a golden file. + def latestCommitTso = { tabletId -> + def rows = sql_return_maparray """ + SELECT COMMIT_TSO FROM information_schema.rowsets + WHERE TABLET_ID = ${tabletId} ORDER BY TXN_ID DESC LIMIT 1 + """ + def range = rows[0]["COMMIT_TSO"].toString() =~ /\[(-?\d+)-(-?\d+)\]/ Review Comment: [P2] Wait for the rowset snapshot before indexing it `information_schema.rowsets` is a distributed BE snapshot, so the just-inserted rowset is not guaranteed to be visible on this first query. Existing TSO and rowset regression tests retry this lookup (`test_tso_rowset_commit_tso.groovy` and `test_query_sys_rowsets.groovy`); here an empty snapshot immediately throws at `rows[0]`, making the new suite flaky. Please poll until a valid positive singleton `COMMIT_TSO` is visible before returning it. ########## be/src/exec/rowid_fetcher.cpp: ########## @@ -998,8 +998,9 @@ Status RowIdStorageReader::read_doris_format_row( segment = seg_item.segment; } - // if row_store_read_struct not empty, means the line we should read from row_store - if (!row_store_read_struct.default_values.empty()) { + const bool use_row_store = !row_store_read_struct.default_values.empty(); Review Comment: [P2] Skip row-store I/O for a TSO-only lazy fetch For a full-row-store query such as `SELECT __DORIS_COMMIT_TSO_COL__ FROM t ORDER BY v LIMIT 10`, TopN lazy materialization can send `fetch_row_store=true` with commit TSO as the only lazy slot. This branch then reads and decodes the JSONB row, but the loop below immediately truncates that placeholder before resolving TSO through `seek_and_read_by_rowid`, so all of that row-store data-page I/O and decoding is discarded. Please enable this path only when at least one non-TSO lazy slot can consume the JSONB row, and cover the TSO-only two-phase shape. ########## be/test/service/point_query_exector_test.cpp: ########## @@ -411,7 +730,7 @@ TEST_F(LookupConnectionCacheTest, PQTestEntryLifetime) { auto entry = cache.get(123); ASSERT_NE(entry, nullptr); EXPECT_EQ(entry.use_count(), 3); // Cache + local reference - } // Local reference released + } // Local reference released Review Comment: [P2] Restore the clang-format output This changed line is the sole changed-file clang-format 16 violation, and the live Clang Formatter job is failing on this head. Please keep the formatter-produced spacing so the mandatory style gate can pass. ```suggestion } // Local reference released ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
