Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove separate entity counting step at end of copy #5819

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

lutter
Copy link
Collaborator

@lutter lutter commented Feb 12, 2025

We used to count all entities in the destination after all data had been copied; for large subgraphs, that can be a very slow operation, and in some cases makes the copy operation fail because the underlying fdw connection times out.

With this PR, we now update the entity count with every batch we copy.

With recent changes, BatchCopy has become unnecessary
We used to count entities after all the data had been copied, but that is a
very slow operation for large subgraphs; that in turn can lead to bad
side-effects like connection timeouts and the copy ultimately failing.

We now keep track of the number of current entity versions that we copy
with each batch and calculate the entity count incrementally
We used to count entities, but we know the result is 0 because all the
tables we are counting are empty
@fordN fordN requested review from zorancv and mangas February 13, 2025 17:01
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