Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BugFix] fix tablet writer add chunk when larger than 2GB #51152

Merged
merged 7 commits into from
Sep 20, 2024

Conversation

luohaha
Copy link
Contributor

@luohaha luohaha commented Sep 19, 2024

Why I'm doing:

There two issues now when handle >2GB chunk:

  1. starrocks.PTabletWriterAddChunksRequest exceeded maximum protobuf size of 2GB: 4194416177
void serialize_to_iobuf(const T& proto_obj, butil::IOBuf* iobuf) {
    butil::IOBuf tmp_iobuf;
    butil::IOBufAsZeroCopyOutputStream wrapper(&tmp_iobuf);
    proto_obj.SerializeToZeroCopyStream(&wrapper);

SerializeToZeroCopyStream will fail when handle >2GB chunk.

  1. In previous pr [BugFix] Fix brpc continuously fail after backend host restart #40229, It introduced a bug about missing set http protocol for BRPC client.
 input_messenger.cpp:96] A message from 172.26.94.64:39672(protocol=baidu_std) is bigger than 2147483648 bytes, the connection will be closed. Set max_body_size to allow bigger messages

What I'm doing:

Fix these two issues:

  1. Seperate chunk from protobuf, so SerializeToZeroCopyStream won't fail because of >2GB serialize.
  2. Set http protocol for brpc::ChannelOptions when handle >2GB RPC.

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 3.3
    • 3.2
    • 3.1
    • 3.0
    • 2.5

@luohaha luohaha requested a review from a team as a code owner September 19, 2024 07:25
Signed-off-by: luohaha <[email protected]>
Signed-off-by: luohaha <[email protected]>
Signed-off-by: luohaha <[email protected]>
@luohaha luohaha requested a review from a team as a code owner September 19, 2024 21:40
Signed-off-by: luohaha <[email protected]>
chaoyli
chaoyli previously approved these changes Sep 19, 2024
Signed-off-by: luohaha <[email protected]>
Copy link

[Java-Extensions Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

[FE Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

[BE Incremental Coverage Report]

fail : 41 / 59 (69.49%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 be/src/util/brpc_stub_cache.h 0 1 00.00% [166]
🔵 be/src/service/service_be/internal_service.cpp 17 27 62.96% [114, 121, 122, 123, 127, 128, 134, 135, 140, 141]
🔵 be/src/exec/tablet_sink_index_channel.cpp 20 26 76.92% [697, 698, 716, 717, 719, 720]
🔵 be/src/util/internal_service_recoverable_stub.cpp 4 5 80.00% [57]

@meegoo meegoo merged commit 1766f02 into StarRocks:main Sep 20, 2024
51 of 52 checks passed
Copy link

@Mergifyio backport branch-3.3

Copy link

@Mergifyio backport branch-3.2

Copy link
Contributor

mergify bot commented Sep 20, 2024

backport branch-3.3

✅ Backports have been created

Copy link
Contributor

mergify bot commented Sep 20, 2024

backport branch-3.2

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Sep 20, 2024
Signed-off-by: luohaha <[email protected]>
(cherry picked from commit 1766f02)

# Conflicts:
#	be/src/util/brpc_stub_cache.h
#	be/src/util/internal_service_recoverable_stub.cpp
#	be/src/util/internal_service_recoverable_stub.h
mergify bot pushed a commit that referenced this pull request Sep 20, 2024
Signed-off-by: luohaha <[email protected]>
(cherry picked from commit 1766f02)

# Conflicts:
#	be/src/util/brpc_stub_cache.h
#	be/src/util/internal_service_recoverable_stub.cpp
#	be/src/util/internal_service_recoverable_stub.h
wanpengfei-git pushed a commit that referenced this pull request Sep 20, 2024
wanpengfei-git pushed a commit that referenced this pull request Sep 20, 2024
renzhimin7 pushed a commit to renzhimin7/starrocks that referenced this pull request Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants