HappenLee commented on code in PR #68097: URL: https://github.com/apache/doris/pull/68097#discussion_r4044901958
########## 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: This is a synchronization issue in the regression test's metadata-based oracle, independent of the BE commit-TSO reader-entrypoint fix. Although the helper is part of the regression suite added by this PR, we will address its timing assumption in a separate follow-up to keep this PR focused on the reader fix. The follow-up should wait for the target write's valid positive singleton TSO, require a newer TSO after the second insert (or identify the rowset by transaction/version), and report the last observed metadata on timeout. In Cloud mode, it should also ensure an effective metadata-refresh path without prewarming the hidden TSO reader; repeatedly querying the same cached snapshot alone may not be sufficient. The helper remains unchanged in this PR, and this timing failure has not been independently reproduced. Resolving this thread as deferred to follow-up, not as fixed. -- 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]
