Add MigrationTarget lifecycle support #414
Draft
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.
This PR adds an experimental
MigrationTarget
lifecycle type to the POSIX and GCP storage implementations, and adds an experimental tool for exercising them.This code is exploring a mechanism to do a high-performance migration of data from one tlog-tiles compliant log into another; e.g. to allow Tessera operators to easily migrate their log from one storage infrastructure to another.
Rather than going through the sequencing "front door" or a pre-ordered type flow, this implementation operates at the level below, replicating static resources in an obscenely parallel fashion before updating the storage's private treeState. This means that, for example, the operator could, once migration was complete, run a Tessera-based frontend which operates in the
Appender
lifecycle mode (e.g. the conformance frontend) and have it take over the tree and [continue] to operate it as an append-only log in its new location.The
main
files currently have a "HACK" commit each, which enables fetching from Static CT API compliant source logs - this is only because there aren't (m)any large publicly available tlog-tile compliant logs as yet.Performance is resaonable: GCP migrated a log with 13712258 entries in 2m10s (~100k entries/s), and this would presumably scale further in a cloud -> cloud scenario with more migration workers.