shuke987 opened a new pull request, #71171:
URL: https://github.com/apache/doris/pull/71171

   ### Background
   
   The BE unit test binary initializes a smaller `ExecEnv` than a running BE. 
Tests in the same process share the file-cache flag and factory. A suite that 
leaves caching disabled can hide a missing cache dependency in a later test.
   
   ### What problem does this PR solve?
   
   Issue Number: None  
   Related PR: #68797 enabled file caching by default. #70243 addresses 
overlapping fixtures and proposes a runner-wide default.  
   PR Type: Test
   
   Across four GoogleTest processes, the Hive report writer dereferenced a 
missing factory. The HDFS and S3 writers, packed-file append, tablet deletion, 
and snapshot move reached a factory with zero registered caches. The six tests 
passed in a previous serial run. This change makes the relevant test 
preconditions explicit in the tests themselves.
   
   ### Details
   
   - The Hive report helper and the S3 multipart error test temporarily disable 
caching. The DeltaWriter and SnapshotLoader cases keep that setting through 
rowset cleanup. Each scope restores the incoming flag.
   - The packed-file test opts out on its individual append request.
   - `HdfsFileSystemTest.Write` explicitly enables caching and installs a 
test-owned memory cache. It retains the original HDFS write and file-content 
assertions. After close it reads the downloaded blocks, checks that their 
offsets cover the file without gaps, and compares each block with the 
corresponding bytes in the mock HDFS file. It restores the incoming factory, 
flag, and HDFS batch size on exit.
   
   ### Testing
   
   - All six changed files pass clang-format 16.0.6. The BE build-hygiene 
checks and `git diff --check` pass.
   - The local worktree has no ASAN test binary, and the available disk space 
is insufficient for a fresh full BE build. Runtime verification is pending CI.
   - Focused filter for reproducing the six cases in a BE test environment:
   
   ```sh
   ./run-be-ut.sh --run 
--filter='VHivePartitionWriterReportLifecycleTest.PeriodicReportDefersMetadataAndFinalReportTransfersUploadIdentity:HdfsFileSystemTest.Write:PackedFileManagerTest.AppendSmallFileSuccess:S3FileWriterTest.multi_part_io_error:TestDeltaWriterClusterKey.vec_sequence_col:SnapshotLoaderTest.DirMoveTaskIsIdempotent'
   ```
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Behavior changed: No
   - Does this need documentation: No
   - Pre-submission status: Partially verified. Local static checks passed, 
ASAN runtime results are pending.
   


-- 
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]

Reply via email to