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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

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

Signed-off-by: luohaha <18810541851@163.com>
Signed-off-by: luohaha <18810541851@163.com>
@luohaha luohaha requested a review from a team as a code owner September 19, 2024 07:25
Signed-off-by: luohaha <18810541851@163.com>
Signed-off-by: luohaha <18810541851@163.com>
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 : 37 / 53 (69.81%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 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% [696, 697, 716, 717, 718, 719]

Signed-off-by: luohaha <18810541851@163.com>
@luohaha luohaha requested a review from a team as a code owner September 19, 2024 21:40
Signed-off-by: luohaha <18810541851@163.com>
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.

2 participants