This is an automated email from the ASF dual-hosted git repository.
gavinchou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new b007b96b273 [opt](debug) remove redundant DCHECK to allow graceful
error handling (#47644)
b007b96b273 is described below
commit b007b96b2735d580b6a7460b77c110788ef871f9
Author: zzzxl <[email protected]>
AuthorDate: Tue Feb 11 18:22:10 2025 +0800
[opt](debug) remove redundant DCHECK to allow graceful error handling
(#47644)
I removed the DCHECK statement from the code because it was redundant.
The existing error handling, which returns an error status, is
sufficient to handle the failure gracefully without causing a crash.
This approach ensures that the process can fail as intended without
abrupt termination.
---
be/src/io/fs/hdfs_file_writer.cpp | 1 -
1 file changed, 1 deletion(-)
diff --git a/be/src/io/fs/hdfs_file_writer.cpp
b/be/src/io/fs/hdfs_file_writer.cpp
index ff68d1c837a..26aec97129b 100644
--- a/be/src/io/fs/hdfs_file_writer.cpp
+++ b/be/src/io/fs/hdfs_file_writer.cpp
@@ -410,7 +410,6 @@ Status HdfsFileWriter::_append(std::string_view content) {
if (_batch_buffer.full()) {
auto error_msg = fmt::format("invalid batch buffer status,
capacity {}, size {}",
_batch_buffer.capacity(),
_batch_buffer.size());
- DCHECK(false) << error_msg;
return Status::InternalError(error_msg);
}
size_t append_size = _batch_buffer.append(content);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]