Repository navigation
s3 adaptive timeouts - #56314
s3 adaptive timeouts#56314
Conversation
|
This is an automated comment for commit 74a8f31 with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page Successful checks
|
cb9dfd5 to
bbc664d
Compare
|
I will be fixing tests for some time. However the code is complete, I think. |
|
There is an interesting case. There are 2 posible solution:
Im choosing second option. It is more simple. |
|
One more issue.
That issue is present with us regardless this changes. That changes have exposed the problem. There is no point in trying complete multipart upload with aggressive timeouts. There would be retries 100%. That retries would trigger the case described above. |
There was a problem hiding this comment.
You're reading from the config a single uint, why is it "timeouts" and not "timeout"?
UPD: I got it, it's a boolean value, so it's better to use getBool().
There was a problem hiding this comment.
I have named the feature flag as s3_aggressive_timeouts. Here I just cut off the s3_ prefix and it becomes aggressive_timeouts.
I could change the feature name in order to keep meaning after cutting s3_ prefix.
What do you like?
s3_aggressive_retries + aggressive_retries,
s3_adaptive_timeouts_when_retries + adaptive_timeouts_when_retries,
s3_adaptive_timeout + adaptive_timeout.
There was a problem hiding this comment.
For me "adaptive_timeouts" looks better, but maybe there is a well-known name for that. Why did you name them "aggressive" in the beginning?
There was a problem hiding this comment.
Why don't you want to use the word "use"? The name "use_aggressive_timeouts" immediately makes it clear that it's a boolean. But of course as you already have other settings it's important to follow the existing naming rules.
There was a problem hiding this comment.
I like it
s3_use_adaptive_timeouts + use_adaptive_timeouts.
Will change in that way.
There was a problem hiding this comment.
The naming is most procrastinating part, thanks.
cdb183b to
6be57e5
Compare
|
Good test CH reads some key. First attempt. Timeouts are low. The first byte is fast. CH creates I'm going to increase receive timeout for the next calls after first byte has been received. |
6e16f28 to
caf03d5
Compare
51655d8 to
dd01fa7
Compare
dd01fa7 to
3075bd9
Compare
| { | ||
| _sendTimeout = sendTimeout; | ||
|
|
||
| if (connected()) |
There was a problem hiding this comment.
strictly speaking not any option cannot be set on an already connected socket.
EISCONN
The socket is already connected, and a specified option cannot be set while the socket is connected.
maybe we could wrap this code in a try-catch just in case we run in some interesting system. also may be that I overcomplicate everything or timeout options are guaranteed to work.
There was a problem hiding this comment.
Well, timeouts options are always set after connection are established. The point was that it was done only at connection, but it was omitted at reusing already established connection from the pool .
If we are not able to modify that options our connections would work unpredictably.
I did not find any mention that SO_SNDTIMEO could be end up with EISCONN.
But any way I can add try catch.
There was a problem hiding this comment.
I added try catch which mutes exceptions in release build from setTimeout
Co-authored-by: Nikita Taranov <[email protected]>
…/storage_conf.xml Co-authored-by: Nikita Taranov <[email protected]>
…/storage_conf.xml Co-authored-by: Nikita Taranov <[email protected]>
|
@CheSema, please don't forget to check failed tests before mering even if failures seem to be unrelated to changes. Looks like this PR breaks |
That test is flaky. I was going to deal with that flakiness aside that PR. That is why I ignored it. |
|
GCP affected by this PR, the fix here #59015 |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
S3 adaptive timeout means that first attempt made with low send and receive timeouts.