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

disagg: The S3 LIST always return nothing after bumping the aws-sdk-cpp #8288

Closed
JaySon-Huang opened this issue Nov 1, 2023 · 1 comment · Fixed by #8284
Closed

disagg: The S3 LIST always return nothing after bumping the aws-sdk-cpp #8288

JaySon-Huang opened this issue Nov 1, 2023 · 1 comment · Fixed by #8284
Labels
component/storage severity/major type/bug The issue is confirmed as a bug.

Comments

@JaySon-Huang
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

2. What did you expect to see? (Required)

3. What did you see instead (Required)

The LIST result from S3 always return empty result.

We must pick this commit to make the aws-sdk-cpp work with Poco client: JaySon-Huang/aws-sdk-cpp@75b6642

4. What is your TiFlash version? (Required)

Introduced by #8247

@JaySon-Huang
Copy link
Contributor Author

The root cause of it is we use PocoHTTPClient in TiFlash. The class uses HTTPFixedLengthStreamBuf, a subclass of the Poco::BasicBufferedStreamBuf, as the underlying buffer of HTTP response inputstream.

And the Poco::BasicBufferedStreamBuf is a lazy fetching response buffer. So the result of tellp() is not reliable. Only peek() will run into Poco::BasicBufferedStreamBuf::underflow() and get the correct result into buffer.

https://github.com/pingcap/poco/blob/170872b2a15ea042d99f8168a01aec896eef0840/Foundation/include/Poco/BufferedStreamBuf.h#L91-L110

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/storage severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant