github-actions[bot] commented on code in PR #63531: URL: https://github.com/apache/doris/pull/63531#discussion_r3301836839
########## regression-test/suites/cloud_p0/packed_file/test_packed_file_async_close_error.groovy: ########## @@ -0,0 +1,78 @@ +// 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_packed_file_async_close_error", "p0, nonConcurrent") { + if (!isCloudMode()) { + return + } + + def closeErrorPoint = "S3FileWriter._close_impl.inject_error" + def afterFinalizeSleepPoint = "SegmentFlusher._flush_segment_writer.after_finalize.sleep" + def waitDatClosedPoint = "SegmentFileCollection.close.wait_dat_closed" + + sql """ DROP TABLE IF EXISTS test_packed_file_async_close_error """ + sql """ + CREATE TABLE IF NOT EXISTS test_packed_file_async_close_error ( + `k1` int NULL, + `v1` varchar(32) NULL, + INDEX idx_v1 (`v1`) USING INVERTED PROPERTIES("parser" = "english") + ) ENGINE=OLAP + DUPLICATE KEY(`k1`) + DISTRIBUTED BY HASH(`k1`) BUCKETS 1 + PROPERTIES ( + "replication_allocation" = "tag.location.default: 1" + ) + """ + + setBeConfigTemporary([ + "enable_packed_file": "false", Review Comment: This test disables `enable_packed_file`, so `RowsetWriterContext` will not wrap the S3 filesystem with `PackedFileSystem` and the `PackedFileManager::process_uploading_packed_files()` / `try_finish_close()` path changed by this PR is not exercised. With the S3 close debug point enabled, the failure can instead come from normal segment `.dat` close handling, making the regression test ineffective for this fix. Please enable packed files for this test (and keep the rest of the setup forcing a small packed upload) so it covers the async packed-file close path. ########## be/src/olap/rowset/segment_creator.cpp: ########## @@ -235,6 +236,9 @@ Status SegmentFlusher::_flush_segment_writer( return Status::Error(s.code(), "failed to finalize segment: {}", s.to_string()); } + DBUG_EXECUTE_IF("SegmentFlusher._flush_segment_writer.after_finalize.sleep", Review Comment: This new use of `std::this_thread::sleep_for` needs `<thread>`, but this file only adds `<chrono>`. `std::this_thread` is declared by `<thread>`; relying on an indirect include can break the BE build on toolchains/header-order changes. Please add `#include <thread>` here as was done in `beta_rowset_writer.cpp`. -- 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]
