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

fix(db): replace sequence prediction #1764

Merged
merged 4 commits into from
Jul 12, 2024

Conversation

sven-urbanski-freiheit-com
Copy link
Collaborator

The original attempt was to read "last_value" of a squence to determine the next Primary Key and also write it into the json blob.

This was error prone, and especially failed on the first startup (with an "empty" sequence).

This PR changes this approach. It was necessary to add an interface function to set the transformer ID.

Background: The transformer ID is required for the commit events, so that we can easily find all commit events of one transformer.

@sven-urbanski-freiheit-com sven-urbanski-freiheit-com requested a review from a team as a code owner July 12, 2024 13:11
pkg/db/db.go Outdated Show resolved Hide resolved
pkg/db/db.go Outdated Show resolved Hide resolved
Copy link
Contributor

@ahmed-nour-fdc ahmed-nour-fdc left a comment

Choose a reason for hiding this comment

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

Please remove the debugging logs

The original attempt was to read "last_value" of a squence to determine the *next* Primary Key and also write it into the json blob.

This was error prone, and especially failed on the first startup (with an "empty" sequence).

This PR changes this approach. It was necessary to add an interface function to set the transformer ID.

Background: The transformer ID is required for the commit events, so that we can easily find all commit events of one transformer.
@sven-urbanski-freiheit-com sven-urbanski-freiheit-com merged commit fb8cb14 into main Jul 12, 2024
17 checks passed
@sven-urbanski-freiheit-com sven-urbanski-freiheit-com deleted the su-db-fix-transformer-id branch July 12, 2024 15:40
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