Skip to content

[fix](broker) fix broker read issue - #24635

Merged
morningman merged 1 commit into
apache:masterfrom
morningman:broker_read_bytes
Sep 20, 2023
Merged

[fix](broker) fix broker read issue#24635
morningman merged 1 commit into
apache:masterfrom
morningman:broker_read_bytes

Conversation

@morningman

@morningmanmorningman commented Sep 19, 2023

Copy link
Copy Markdown
Contributor

Proposed changes

The given "length" of broker's pread() method is the buffer length, not the length required from file.
So it may larger than the file length.
So we should return all read data, instead of return EOF when read() method return -1

I will add regression test case later when the framework support broker process.

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@morningmanmorningman added the kind/need-regression-test Need to add regression test for this case label Sep 19, 2023
@morningman

Copy link
Copy Markdown
ContributorAuthor

run buildall

@kaka11chenkaka11chen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@wsjzwsjz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@xiaokangxiaokang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actionsgithub-actionsBot added the approved Indicates a PR has been approved by one committer. label Sep 20, 2023
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@morningman
morningman merged commit c41cadb into apache:masterSep 20, 2023
JingDas pushed a commit to JingDas/doris that referenced this pull request Sep 20, 2023
The given "length" of broker's pread() method is the buffer length, not the length required from file.
So it may larger than the file length.
So we should return all read data, instead of return EOF when `read()` method return -1
I will add regression test case later when the framework support broker process.
xiaokang pushed a commit that referenced this pull request Sep 20, 2023
The given "length" of broker's pread() method is the buffer length, not the length required from file.
So it may larger than the file length.
So we should return all read data, instead of return EOF when `read()` method return -1
I will add regression test case later when the framework support broker process.
@xiaokangxiaokang mentioned this pull request Sep 28, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by one committer.dev/2.0.2-mergedkind/need-regression-testNeed to add regression test for this casep0_breviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@morningman@xiaokang@kaka11chen@wsjz