-
Notifications
You must be signed in to change notification settings - Fork 100
Perform logical replication after initial sync #144
base: master
Are you sure you want to change the base?
Conversation
@Samira-El Would you be happy with these changes instead of #130? I believe they should address the same issue. |
@Samira-El Could you please review this? |
@koszti Would you be willing to review this? |
@Samira-El I believe this should also be ready for a review. This would also allow the closure of #131 and #130, I believe. |
As the author of #130 I agree that this is a better fix. I've closed that PR in favor of this one. Is there anything preventing this from being merged @Samira-El ? |
I'm actually getting an error running this branch, I'll need to do some more investigation:
|
Hmmm... Interesting. I'm confused as to how this could be caused by the changes here as the line you're seeing a failure on is also run right at the beginning of that function: So the |
Time, I don't have time to review yet it 😓. This is crucial tap for us, so PRs need to be properly reviewed. |
@Samira-El Any ideas when you might have the time to review this? We're currently running a fork and would of course love to be able to minimize the divergence! |
Hey Judah, I'm running into the same error encountered by Dean:
I'm following the bug reproduction step in #107 |
@Samira-El I think my latest commit fixes this issue. |
assert CAUGHT_MESSAGES[8]['type'] == 'SCHEMA' | ||
|
||
assert isinstance(CAUGHT_MESSAGES[9], singer.messages.StateMessage) | ||
assert CAUGHT_MESSAGES[9].value['bookmarks']['public-COW'].get('xmin') is None | ||
assert CAUGHT_MESSAGES[9].value['bookmarks']['public-COW'].get('lsn') == end_lsn | ||
assert CAUGHT_MESSAGES[9].value['bookmarks']['public-COW'].get('version') == new_version | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use TestCase assert*
methods instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Samira-El I'm facing this issue and planning on contributing the fix. Is your feedback related to line 268 only? That is change it to assertIsInstance(CAUGHT_MESSAGES[9], singer.messages.StateMessage)
. Asking this since I see all other assert statements don't use TestCase either.
Hey folks, just had the time to review this PR, the fix LGTM, I left a comment on the tests tho. The CI is broken because of a recent merged PR, we will roll it back and rerun the tests on this one. |
Problem
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
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.Types of changes
What types of changes does your code introduce to PipelineWise?
Put an
x
in the boxes that applyChecklist
setup.py
is an individual PR and not mixed with feature or bugfix PRs[AP-NNNN]
(if applicable. AP-NNNN = JIRA ID)AP-NNN
(if applicable. AP-NNN = JIRA ID)