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

require cdc users to create publications & update docs #2818

Merged
merged 6 commits into from
Apr 9, 2021

Conversation

jrhizor
Copy link
Contributor

@jrhizor jrhizor commented Apr 8, 2021

We were running into strange race conditions around the creation of the publication. Turning it off fixes the problem but exposes that we occasionally run into issues with more than once delivery around the edges of snapshotting.

@jrhizor jrhizor changed the title postgres cdc race condition require cdc users to create publications & update docs Apr 9, 2021
@jrhizor jrhizor requested a review from cgardens April 9, 2021 16:20
@jrhizor jrhizor marked this pull request as ready for review April 9, 2021 16:20
@auto-assign auto-assign bot requested a review from sherifnada April 9, 2021 16:20
@@ -85,6 +89,7 @@ public void start(Queue<ChangeEvent<String, String>> queue) {
.using((success, message, error) -> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this callback only gets invoked when the engine is totally off i'm assuming?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, it's the last thing

executor.awaitTermination(5, TimeUnit.MINUTES);

// after the engine is completely off, we can mark this as closed
hasClosed.set(true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this can go before the execute shutdown. it just had to be after the latch. not that its'a big difference either way.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I didn't notice any difference. I just wanted to be as conservative as possible.

@jrhizor jrhizor merged commit 2fd3582 into jrhizor/debezium Apr 9, 2021
@jrhizor jrhizor deleted the jrhizor/race-condition-cdc branch April 9, 2021 18:14
jrhizor added a commit that referenced this pull request Apr 9, 2021
* spike

* more

* debezium wip

* use oneof for configuration

* iterator wrapping structure

* push current

* working loop

* move capability into source

* hack it into a sharable state

* debezium test runner (#2617)

* CDC Wait for Values (#2618)

* output actual AirbyteMessages for cdc (#2631)

* message conversion

* fmt

* add lsn extraction and comparison (#2613)

* postgres cdc catalog (#2673)

* update cdc catalog

* A

* table selection for cdc (#2690)

* table selection for cdc

* fix broken merge

* also test double quote in name

* Add state management to CDC (#2718)

* CDC: Fix Producer/Consumer State Machine (#2721)

* CDC Postgres Tests (#2777)

* fix postgres cdc image name and run check before reading data (#2785)

* minor postgres cdc fixes

* add test and fix check behavior

* fix

* improve comment

* remove unused props, remove todos, add some more sanity tests (#2791)

* cdc: add offset store tests (#2793)

* clean (#2798)

* postgres cdc docs (#2784)

* cdc docs

* Update docs/integrations/sources/postgres.md

Co-authored-by: Charles <[email protected]>

* address gcp

* learn too english

* add link

* add more disk space warnings

* add additional cdc use case

* add information on how to find postgresql.conf

* add how to find the file

Co-authored-by: Charles <[email protected]>

* various merge conflict fixes (#2799)

* cdc standard tests (#2813)

* require cdc users to create publications & update docs (#2818)

* postgres cdc race condition

* working? but different process

* add additional logging to help debug in the future

* everything done except working config

* remove unintended change

* Use oneOf in PG CDC spec (#2827)

* add oneOf configuration for postgres cdc  (#2831)

* add oneof configuration for cdc postgres

* fmt

Co-authored-by: Charles <[email protected]>

* fix test (#2834)

* fix test

* bump version

* add docs on creating replica identities (#2838)

* add docs on creating replica identities

* emphasize danger

* grammar

* bump pg version in source catalog

* generate seed files

Co-authored-by: cgardens <[email protected]>
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.

2 participants