Skip to content

Conversation

@xy720
Copy link
Member

@xy720 xy720 commented Jun 16, 2020

Fix #3879
This commit fixs a bug that broker cannot read the full length of buffer size, when the buffer size is set larger than 128k.

This bug will cause the data size returned by pread request to be less than 128K all the time.

"end of file reached");
}
return ByteBuffer.wrap(buf, 0, readLength);
logger.info("read length:" + length + ", readBufferSize:" + readBufferSize + ", return length:" + readLength);
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe too many logs here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Turn log level to debug.

Copy link
Contributor

@yiguolei yiguolei left a comment

Choose a reason for hiding this comment

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

some comments

"end of file reached");
}
return ByteBuffer.wrap(buf, 0, readLength);
logger.debug("read buffer from input stream, buffer size:" + buf.capacity() + ", read length:" + readLength);
Copy link
Contributor

Choose a reason for hiding this comment

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

if (logger.isDebugEnable()) {
logger.debug("read buffer from input stream, buffer size: {}, read length: {}", buf.capacity(), readLength);
}

Copy link
Member Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

@morningman morningman added approved Indicates a PR has been approved by one committer. area/broker Issues or PRs related to broker kind/improvement labels Jun 18, 2020
@morningman morningman merged commit 1d9fa50 into apache:master Jun 19, 2020
morningman added a commit that referenced this pull request Jun 20, 2020
This bug is introduced by PR #3784 
In #3784, I remove the `Catalog.getInstance()`, and use `Catalog.getCurrentCatalog()` instead.

But actually, there are some place that should use the serving catalog explicitly.

Mainly changed:

1. Add a new method `getServingCatalog()` to explicitly return the real catalog instance.
2. Fix a compile bug of broker introduced by #3881
morningman pushed a commit to morningman/doris that referenced this pull request Jun 22, 2020
)

This commit fixs a bug that broker cannot read the full length of buffer size, when the buffer size is set larger than 128k.

This bug will cause the data size returned by pread request to be less than 128K all the time.
morningman added a commit to morningman/doris that referenced this pull request Jun 22, 2020
This bug is introduced by PR apache#3784 
In apache#3784, I remove the `Catalog.getInstance()`, and use `Catalog.getCurrentCatalog()` instead.

But actually, there are some place that should use the serving catalog explicitly.

Mainly changed:

1. Add a new method `getServingCatalog()` to explicitly return the real catalog instance.
2. Fix a compile bug of broker introduced by apache#3881
acelyc111 pushed a commit to acelyc111/incubator-doris that referenced this pull request Jan 20, 2021
This bug is introduced by PR apache#3784
In apache#3784, I remove the `Catalog.getInstance()`, and use `Catalog.getCurrentCatalog()` instead.

But actually, there are some place that should use the serving catalog explicitly.

Mainly changed:

1. Add a new method `getServingCatalog()` to explicitly return the real catalog instance.
2. Fix a compile bug of broker introduced by apache#3881
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. area/broker Issues or PRs related to broker kind/improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]Broker cannot read the full length of buffer size

3 participants