0AyanamiRei opened a new pull request, #66250:
URL: https://github.com/apache/doris/pull/66250
### What problem does this PR solve?
Issue Number: None
Related PR: #41320
Load error-log writing and periodic status reporting can concurrently access
the same `std::ofstream`. The reporting path may close and upload the stream
while the writer is appending an error row, causing a data race and a BE
SIGSEGV in the stream write path.
This PR uses one mutex to protect the complete load error-log state
transition: file creation, first-error state, stream writes, path retrieval,
close, upload, and URL generation. It also adds a fault-injection regression
that pauses the writer before its first write while periodic reporting requests
the error-log path.
The regression explicitly disables insert value auto-casting so the overlong
string reaches BE validation instead of being truncated by FE planning.
### Release note
None
### Check List (For Author)
- Test: Regression test and local build
- `BUILD_TYPE=Debug ./build.sh --be -j48`
- `BUILD_TYPE=Debug ./build.sh --fe --be --cloud -j48`
- `./run-regression-test.sh --run -d fault_injection_p0/cloud -s
test_load_error_log_concurrent_write`
- The same regression repeated with `-times 3`
- `build-support/check-format.sh`
- `git diff --check`
- Behavior changed: No. This only synchronizes existing load error-log
behavior.
- Does this need documentation: No
--
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]