github-actions[bot] commented on code in PR #70212: URL: https://github.com/apache/doris/pull/70212#discussion_r4478624927
########## regression-test/suites/variant_p0/sparse_ancestor_promotion_extended.groovy: ########## @@ -0,0 +1,140 @@ +// 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. + +import groovy.json.JsonOutput + +suite("sparse_ancestor_promotion_extended", "p0,nonConcurrent") { + sql "SET default_variant_enable_doc_mode = false" + sql "SET describe_extend_variant_column = true" + def backendIPs = [:] + def backendHttpPorts = [:] + getBackendIpHttpPort(backendIPs, backendHttpPorts) + def statusOf = { tablet -> + def (code, out, err) = be_show_tablet_status( + backendIPs["${tablet.BackendId}"], backendHttpPorts["${tablet.BackendId}"], tablet.TabletId) + assert code == 0 : err + parseJson(out) + } + def compact = { String tableName -> + def tablet = sql_return_maparray("SHOW TABLETS FROM ${tableName}")[0] + def before = statusOf(tablet) + assert before.rowsets.size() > 1 : before + trigger_and_wait_compaction(tableName, "full", 300) + def after = statusOf(tablet) + // Query equality alone also passes when compaction fails and leaves inputs intact. + qt_compaction_status "SELECT '${after['last full status'].toString().replace("'", "''")}'" + assert after.rowsets.size() == 1 : after + assert after.rowsets.intersect(before.rowsets).isEmpty() : after + qt_output_rows """SELECT count(*), sum(NUM_SEGMENTS), sum(ROWSET_NUM_ROWS) + FROM information_schema.rowsets WHERE TABLET_ID=${tablet.TabletId} AND NUM_SEGMENTS>0""" Review Comment: [P2] Scope the rowset aggregate to the checked backend In a multi-BE cloud compute group with `enable_cloud_multi_replica`, `qt_before` can cache the input rowsets on BE B while the full compaction and status checks succeed on BE A. `information_schema.rowsets` scans every BE's cached tablet map, so this tablet-only aggregate also counts B's stale inputs (or a duplicate refreshed output). The expected `1 / 1 / N` result then fails despite successful compaction. Filter by `BACKEND_ID` for the verified backend and keep that backend pinned across trigger/status checks, or explicitly guard this physical-layout assertion to local mode. -- 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]
