Repository navigation
Conversation
A producer of a geo topic waits for the upload of its fresh object, so the slowest put is the slowest send. On GCS the median put took about 70 ms, but about one in 4,500 took over a second and some took several. A put was never sent again and was given up only after 30 s without progress, so a put that was slow but alive was simply waited for. A put whose body is held in memory is now sent again after a transient failure. Every attempt carries the same put id in the object's metadata. A create-only put that the store refuses after an earlier attempt may have reached it counts as stored only when the object under its key carries that id, its size and its CRC32C. A request that provably never left is told apart from one whose answer was lost. A create-only put that runs past a threshold for its size gets a second attempt on another connection, with slots of its own, and the first to store the object wins. The defaults are about the 99th percentile by size from the GCS benchmark sends. An attempt at a create-only put is given up after 1 s without body progress or 5 s without an answer. Overwrites are retried but keep the 30 s timeout and get no second attempt, because one cut early could land after a later put of other bytes. Puts that stream a sealed segment from its file are unchanged.
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (5.94%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## geo_persisted_consumer_offsets #5085 +/- ##
=================================================================
Coverage ? 92.20%
Complexity ? 4365
=================================================================
Files ? 1587
Lines ? 428983
Branches ? 357436
=================================================================
Hits ? 395532
Misses ? 27872
Partials ? 5579
🚀 New features to boost your workflow:
|
A long-term segment of up to 64 MiB was stored with one put. One stream to the store carries about 80 MB/s, so a full segment took most of a second and one partition's rewrite could store about one stream's worth of data. The rewrite now lets the put of a segment of at least twice the part size go up in parts, sent side by side within a budget per shard. On S3 that is a multipart upload with a full object CRC32C. GCS refuses preconditions on its multipart API, so there each part is a temporary object and a compose joins them. Either way one request creates the object, create-only, and the CRC32C of all of it is checked. Each part is sent again and given a second attempt as a put is, and a lost answer to the creating request is settled by the put id as before. A store that refuses uploads in parts gets one put from then on. Every other put stays whole, the fresh objects that producers wait for included, because nothing is measured for them yet. An upload that ends without its object is aborted. What a crash leaves is removed by a sweep on shard 0 of the metadata primary, behind the store identity check, once it is older than a grace. An upload gives up at half the grace, so the sweep never meets a live one.
A part replaces what is under its name, so of two attempts at one part the one that loses could still land after the store had the object. On a real GCS bucket a live cluster left 18 temporary objects of 8 MiB behind over 146 uploads: the losing attempt was dropped, GCS committed the body it had already received, and that recreated the temporary after the compose had deleted it. One that lands before the compose replaces the generation the compose names, which fails the upload. A part is now sent one attempt at a time. It is still sent again after a failure, and a slow one is cut by the attempt deadlines. Whole create-only puts keep their second attempt, because the store refuses the one that lands late.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A producer of a geo topic waits for the upload of its fresh object, so
the slowest put is the slowest send. On GCS the median put took about
70 ms, but about one in 4,500 took over a second and some took
several. A put was never sent again and was given up only after 30 s
without progress, so a put that was slow but alive was simply waited
for. A long-term segment of up to 64 MiB was also stored with one put,
which limits one partition's rewrite to about one stream's worth of
data.
A put whose body is held in memory is now sent again after a transient
failure. Every attempt carries the same put id in the object's
metadata. A create-only put that the store refuses after an earlier
attempt may have reached it counts as stored only when the object
under its key carries that id, its size and its CRC32C. A request that
provably never left is told apart from one whose answer was lost.
A create-only put that runs past a threshold for its size gets a
second attempt on another connection, with slots of its own, and the
first to store the object wins. The defaults are about the 99th
percentile by size from benchmark sends on GCS. An attempt at a
create-only put is given up after 1 s without body progress or 5 s
without an answer. Overwrites are retried but keep the 30 s timeout
and get no second attempt, because one cut early could land after a
later put of other bytes. Puts that stream a sealed segment from its
file are unchanged.
The long-term rewrite lets a segment of at least twice the part size
go up in parts, side by side within a budget per shard. On S3 that is
a multipart upload with a full object CRC32C. GCS refuses
preconditions on its multipart API, so there each part is a temporary
object and a compose joins them. Either way one request creates the
object, create-only, and the CRC32C of all of it is checked. A part is
sent again after a failure but gets no second attempt: a part replaces
what is under its name, so the attempt that loses could land after the
object exists and leave a temporary object behind. Every other put
stays whole, the fresh objects that producers wait for included,
because parts lose to one put for objects below about 32 MiB.
An upload in parts that ends without its object is aborted. What a
crash leaves is removed by a sweep on shard 0 of the metadata primary,
behind the store identity check, once it is older than a grace. An
upload gives up at half the grace, so the sweep never meets a live
one.
Measured on real GCS buckets: with second attempts on, none of 731,881
sends took over 1 s, against 791 of 668,872 with them off, for 0.2 to
0.35% more put requests. One partition fed at 95 MB/s was rewritten at
59 MB/s in parts and 39 MB/s with one put per segment, so the rewrite
is faster but still falls behind such a partition.