Upload staging bundle to fixed path in DO storage #37
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.
714c7a0
Add support for multipart uploads to DO storage backend
The KV API for DO storage limits values to 2MB, which we could exceed
when sequencing moderately-sized batches (1000 entries of size 2kB
each). Add support for splitting these writes across multiple DO storage
values to avoid this limit.
b92b8bc
Upload staging bundle to fixed path in DO storage
This commit includes two major changes:
Write staging bundle to a fixed path, fixes Write staging bundle to a fixed path #34.
This means that we don't need to clean up old staging bundles from
object storage. Insert the current tree size and hash into the staging
bundle for good measure, but I don't believe this is necessary.
As an added bonus, this cuts out one R2 write/sec (replaced w/ a write
to DO storage, which should be faster).
Write staging bundle to DO storage instead of R2
The reasons not
to use a fixed path in sunlight are to avoid zombie writes/rollbacks,
and against multiple sequencers writing at the same time. With the
strong consistency guarantees provided by Durable Objects, these
failure modes are not applicable.
Zombie writes: The DO storage relay service requires that writes are
acknowledged by a least three of five "follower" machines, which helps
to ensure that all confirmed writes are correctly persisted in the
proper order.
Multiple sequencers: Durable Objects also guarantees that only a
single 'scheduled' task can run at a time, so we don't have to worry
about multiple sequencers.
Also reword and simplify the storage 'break' modes in the tests.