Skip to content

store: Revert entity versions during copy instead of after#6472

Open
lutter wants to merge 1 commit intomasterfrom
lutter/copy-revert
Open

store: Revert entity versions during copy instead of after#6472
lutter wants to merge 1 commit intomasterfrom
lutter/copy-revert

Conversation

@lutter
Copy link
Copy Markdown
Collaborator

@lutter lutter commented Mar 30, 2026

Reverting entities after copying can be very slow; the step is also unnecessary since we already know during copying which entity versions need to be unclamped and we never copy versions that would have to be deleted by the revert.

We move the revert logic into CopyEntityBatchQuery so that entity versions are reverted as they are copied rather than in a separate revert_block pass after copying completes.

The post-copy revert_block call in start_subgraph is kept as a no-op safety net for copies that were started with older code and resumed after upgrading. It can be removed once a release with this logic has been out for long enough.

Reverting entities after copying can be very slow; the step is also
unnecessary since we already know during copying which entity versions need
to be unclamped and we never copy versions that would have to be deleted by
the revert.

We move the revert logic into CopyEntityBatchQuery so that entity versions
are reverted as they are copied rather than in a separate revert_block pass
after copying completes.

The post-copy revert_block call in start_subgraph is kept as a no-op safety
net for copies that were started with older code and resumed after
upgrading. It can be removed once a release with this logic has been out
for long enough.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant