Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Perform logical replication after initial sync (continuation) #219

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

josescuderoh
Copy link

@josescuderoh josescuderoh commented May 1, 2023

Problem

Describe the problem your PR is trying to solve

This PR aims to complete the work proposed in PR #144 since there original contribuitor will not be able to do so.

If you select new tables to add to an existing log based extract, it'll do a "logical_initial" full table sync on those new tables each and every time the tap runs. It'll never switch over to log based replication for them.

Another example of this issue is that if intend to run with break_at_end_lsn: False then I have to run the tap twice - once to perform the initial sync and again to start the logical replication.

Proposed changes

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.
If it fixes a bug or resolves a feature request, be sure to link to that issue.

From PR #144

This Pull Request contains changes which are simpler and, I believe, more correct than those in #130. Both Pull Requests aim to solve #107.

My changes ensure that whenever a LOG_BASED replication runs the bookmark is initialised correctly and any logical replication which is required is performed.

This PR includes latest changes to the master branch, which include removing some parts of the original PR that are no longer valid due to recent changes merged.

Types of changes

What types of changes does your code introduce to PipelineWise?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Checklist

  • Description above provides context of the change
  • I have added tests that prove my fix is effective or that my feature works
  • Unit tests for changes (not needed for documentation changes)
  • CI checks pass with my changes
  • Bumping version in setup.py is an individual PR and not mixed with feature or bugfix PRs
  • Commit message/PR title starts with [AP-NNNN] (if applicable. AP-NNNN = JIRA ID)
  • Branch name starts with AP-NNN (if applicable. AP-NNN = JIRA ID)
  • Commits follow "How to write a good git commit message"
  • Relevant documentation is updated including usage instructions

@josescuderoh josescuderoh marked this pull request as ready for review May 1, 2023 22:50
@josescuderoh
Copy link
Author

josescuderoh commented May 1, 2023

@Samira-El any chance you can re-review this small PR soon? Thanks! 🙏

@TyShkan
Copy link

TyShkan commented Oct 19, 2023

Hey, hitting the same problem, any chance the PR could be reviewed any time soon?

@TyShkan
Copy link

TyShkan commented Oct 19, 2023

I've tested this version against my case and see following changes:

  • New tables are correctly detected and initially fully synced
  • The running process keeps waiting for new wal messages and then just completes the previous captured changes
  • New launches keep replaying the lately applied changes even if no new changes appeared

Edited 1: And that seems to be changes that appeared after switching to a git pip url, even local copy of 2.1.0 version tag works differently. That's weird
Edited 2: Ah, that behaviour caused by Python version upper bound limit introduced in 2.0.0 version. That means I had tap version 1.8.4 installed in my Python 3.11 env.

@florian-ernst-alan
Copy link

Damn, kinda surprised such a big bug is present in such a popular tap 😅 glad to know I'm not the only one who faced it.

I don't have high hopes of seeing this PR merged one day 🥲

@florian-ernst-alan
Copy link

cc @Samira-El

@martasakal1
Copy link

@Samira-El is there any chance it could be merge anytime soon?

ashishparimi added a commit to ashishparimi/pipelinewise-tap-postgres that referenced this pull request Apr 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants