github-actions[bot] commented on code in PR #31716:
URL: https://github.com/apache/doris/pull/31716#discussion_r1533218724
##########
be/src/cloud/cloud_meta_mgr.cpp:
##########
@@ -545,10 +545,10 @@ Status CloudMetaMgr::sync_tablet_rowsets(CloudTablet*
tablet, bool warmup_delta_
}
}
-Status CloudMetaMgr::sync_tablet_delete_bitmap(
- CloudTablet* tablet, int64_t old_max_version,
- const google::protobuf::RepeatedPtrField<RowsetMetaCloudPB>& rs_metas,
- const TabletStatsPB& stats, const TabletIndexPB& idx, DeleteBitmap*
delete_bitmap) {
+Status CloudMetaMgr::sync_tablet_delete_bitmap(CloudTablet* tablet, int64_t
old_max_version,
Review Comment:
warning: function 'sync_tablet_delete_bitmap' exceeds recommended
size/complexity thresholds [readability-function-size]
```cpp
Status CloudMetaMgr::sync_tablet_delete_bitmap(CloudTablet* tablet, int64_t
old_max_version,
^
```
<details>
<summary>Additional context</summary>
**be/src/cloud/cloud_meta_mgr.cpp:547:** 87 lines including whitespace and
comments (threshold 80)
```cpp
Status CloudMetaMgr::sync_tablet_delete_bitmap(CloudTablet* tablet, int64_t
old_max_version,
^
```
</details>
##########
be/src/io/fs/s3_file_writer.cpp:
##########
@@ -254,7 +244,10 @@ Status S3FileWriter::close() {
}
Status S3FileWriter::appendv(const Slice* data, size_t data_cnt) {
Review Comment:
warning: function 'appendv' has cognitive complexity of 65 (threshold 50)
[readability-function-cognitive-complexity]
```cpp
Status S3FileWriter::appendv(const Slice* data, size_t data_cnt) {
^
```
<details>
<summary>Additional context</summary>
**be/src/io/fs/s3_file_writer.cpp:246:** +1, including nesting penalty of 0,
nesting level increased to 1
```cpp
if (closed()) [[unlikely]] {
^
```
**be/src/io/fs/s3_file_writer.cpp:251:** +1, including nesting penalty of 0,
nesting level increased to 1
```cpp
DBUG_EXECUTE_IF("s3_file_writer::appendv",
^
```
**be/src/util/debug_points.h:34:** expanded from macro 'DBUG_EXECUTE_IF'
```cpp
if (UNLIKELY(config::enable_debug_points)) {
\
^
```
**be/src/io/fs/s3_file_writer.cpp:251:** +2, including nesting penalty of 1,
nesting level increased to 2
```cpp
DBUG_EXECUTE_IF("s3_file_writer::appendv",
^
```
**be/src/util/debug_points.h:36:** expanded from macro 'DBUG_EXECUTE_IF'
```cpp
if (dp) {
\
^
```
**be/src/io/fs/s3_file_writer.cpp:253:** +1, including nesting penalty of 0,
nesting level increased to 1
```cpp
for (size_t i = 0; i < data_cnt; i++) {
^
```
**be/src/io/fs/s3_file_writer.cpp:255:** +2, including nesting penalty of 1,
nesting level increased to 2
```cpp
for (size_t pos = 0, data_size_to_append = 0; pos < data_size; pos
+= data_size_to_append) {
^
```
**be/src/io/fs/s3_file_writer.cpp:256:** +3, including nesting penalty of 2,
nesting level increased to 3
```cpp
if (_failed) {
^
```
**be/src/io/fs/s3_file_writer.cpp:259:** +3, including nesting penalty of 2,
nesting level increased to 3
```cpp
if (!_pending_buf) {
^
```
**be/src/io/fs/s3_file_writer.cpp:263:** nesting level increased to 4
```cpp
[part_num = _cur_part_num,
this](UploadFileBuffer& buf) {
^
```
**be/src/io/fs/s3_file_writer.cpp:268:** nesting level increased to 4
```cpp
.set_sync_after_complete_task([this, part_num =
_cur_part_num](Status s) {
^
```
**be/src/io/fs/s3_file_writer.cpp:270:** +5, including nesting penalty of 4,
nesting level increased to 5
```cpp
if (!s.ok()) [[unlikely]] {
^
```
**be/src/io/fs/s3_file_writer.cpp:284:** nesting level increased to 4
```cpp
.set_is_cancelled([this]() { return _failed.load();
});
^
```
**be/src/io/fs/s3_file_writer.cpp:285:** +4, including nesting penalty of 3,
nesting level increased to 4
```cpp
if (_write_file_cache) {
^
```
**be/src/io/fs/s3_file_writer.cpp:303:** +4, including nesting penalty of 3,
nesting level increased to 4
```cpp
RETURN_IF_ERROR(builder.build(&_pending_buf));
^
```
**be/src/common/status.h:541:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/io/fs/s3_file_writer.cpp:303:** +5, including nesting penalty of 4,
nesting level increased to 5
```cpp
RETURN_IF_ERROR(builder.build(&_pending_buf));
^
```
**be/src/common/status.h:543:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/io/fs/s3_file_writer.cpp:312:** +3, including nesting penalty of 2,
nesting level increased to 3
```cpp
RETURN_IF_ERROR(_pending_buf->append_data(
^
```
**be/src/common/status.h:541:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/io/fs/s3_file_writer.cpp:312:** +4, including nesting penalty of 3,
nesting level increased to 4
```cpp
RETURN_IF_ERROR(_pending_buf->append_data(
^
```
**be/src/common/status.h:543:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/io/fs/s3_file_writer.cpp:318:** +3, including nesting penalty of 2,
nesting level increased to 3
```cpp
if (_pending_buf->get_size() == buffer_size) {
^
```
**be/src/io/fs/s3_file_writer.cpp:321:** +4, including nesting penalty of 3,
nesting level increased to 4
```cpp
if (_cur_part_num == 1) {
^
```
**be/src/io/fs/s3_file_writer.cpp:322:** +5, including nesting penalty of 4,
nesting level increased to 5
```cpp
RETURN_IF_ERROR(_create_multi_upload_request());
^
```
**be/src/common/status.h:541:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/io/fs/s3_file_writer.cpp:322:** +6, including nesting penalty of 5,
nesting level increased to 6
```cpp
RETURN_IF_ERROR(_create_multi_upload_request());
^
```
**be/src/common/status.h:543:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/io/fs/s3_file_writer.cpp:326:** +4, including nesting penalty of 3,
nesting level increased to 4
```cpp
RETURN_IF_ERROR(_pending_buf->submit(std::move(_pending_buf)));
^
```
**be/src/common/status.h:541:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/io/fs/s3_file_writer.cpp:326:** +5, including nesting penalty of 4,
nesting level increased to 5
```cpp
RETURN_IF_ERROR(_pending_buf->submit(std::move(_pending_buf)));
^
```
**be/src/common/status.h:543:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
</details>
--
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]