8000 Fix stream_transform_resume to share context with stream_transform_file. by dimitri · Pull Request #355 · dimitri/pgcopydb · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix stream_transform_resume to share context with stream_transform_file. 8000 #355

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

Merged
merged 3 commits into from
Jun 29, 2023

Conversation

dimitri
Copy link
Owner
@dimitri dimitri commented Jun 29, 2023

When resuming operations from pre-existing files on-disk, we implement some cache invalidation by transforming the JSON file again from scratch, and tracking progress in our internal data structures.

That's needed in case the previous version of the file terminates in the middle of a transaction rather than at a clean transaction boundary.

The previous approach missed that the internal tracking state kept in the StreamContext instance was not shared. Now it is.

See #354.
See #348.
See #331.

When resuming operations from pre-existing files on-disk, we implement some
cache invalidation by transforming the JSON file again from scratch, and
tracking progress in our internal data structures.

That's needed in case the previous version of the file terminates in the
middle of a transaction rather than at a clean transaction boundary.

The previous approach missed that the internal tracking state kept in the
StreamContext instance was not shared. Now it is.
dimitri added 2 commits June 29, 2023 13:08
As seen in the logs:

    ERROR  ld_transform.c:1689       Failed to write to stream: Bad file descriptor
@dimitri dimitri merged commit 1c30653 into main Jun 29, 2023
@dimitri dimitri deleted the fix/share-private-context-in-transform-resume branch June 29, 2023 14:14
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
0