-
Notifications
You must be signed in to change notification settings - Fork 1k
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
create CDC event stream CRD #1570
Conversation
completed codegen manually provide update and compare code for fes add db check for specified databases and tables add unit test
pkg/cluster/streams.go
Outdated
} | ||
|
||
tableNames := make([]string, len(tables)) | ||
i := 0 |
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.
why is this counter needed ?
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.
to fill the tableNames slice a bit quicker. I read that append (which we usually use 😃 ) is slower.
👍 |
👍 |
1 similar comment
👍 |
Hey, I want to include the streams section in the cluster manifet of postgres, I didnt find any example on how to write the tables that we want to include, this is one of my trials: Enables change data capture streams for defined database tablesstreams:
|
The PR introduces a new operator feature to enable change data capture (CDC) streams into Zalando’s distributed event broker Nakadi. It utilizes an internal Zalando operator for creating Debezium workflows reading changes from Postgres’ logical replication slots and distribute to Nakadi (or AWS SQS)
From a new section in the manifest to list streams, the operator will create or update a custom resource that can be picked up by the CDC operator. The Postgres Operator user must specify the database tables for which logical decoding is enabled as well as event topics which are defined in the sink (Nakadi). The CDC operator is build around the outbox pattern. It’s idea is to create a de-normalized table in Postgres that resembles the structure of then event sink and perform logical decoding only on this “outbox” table. Either the app or the database is then responsible to copy change data from original tables to the outbox table. The Postgres Operator assumes that the outbox table is called like the specified table, appended with event type and
_outbox
suffix.ToDo:
fix code generation, atm it has been created manually.Running./hack/update-codegen.sh
only updates acid APIdo we need to sync DB resources? Might be the job of the CDC operator to report if specified databases and tables do not existThe operator should not deal with creating tableslogical
and creating a logical replication slot under Patroni section? Or is it up to the user to configure it before enablingstreams
? yes and no: the operator changes the Postgres config without the need to prepare the manifest