Skip to content

Xmin saving intermediate stream state after a failed connection attempt #26986

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

Closed
1 task
prateekmukhedkar opened this issue Jun 2, 2023 · 1 comment · Fixed by #27212
Closed
1 task

Xmin saving intermediate stream state after a failed connection attempt #26986

prateekmukhedkar opened this issue Jun 2, 2023 · 1 comment · Fixed by #27212
Assignees
Labels
area/connectors Connector related issues connectors/source/postgres team/db-dw-sources Backlog for Database and Data Warehouse Sources team type/bug Something isn't working xmin Postgres xmin replication: issues tagged for xmin feature

Comments

@prateekmukhedkar
Copy link
Contributor

Connector Name

source-postgres

Connector Version

2.0.29-dev-xmin

What step the error happened?

During the sync

Revelant information

Expected behavior: with xmin sync, we expect that stream state containing the high watermark is only written after a successful sync, that is when the job succeeds. This is because we are not ordering the query table results by xmin and hence we have to process all the rows before committing the state message. (Or in other words we cannot emit intermediate state during xmin sync)

Actual: I noticed that after a failed attempt we wrote an intermediate state for the stream. This deviates from the expected behavior. Logs are attached.

Relevant log output

No response

Contribute

  • Yes, I want to contribute
@prateekmukhedkar prateekmukhedkar added type/bug Something isn't working area/connectors Connector related issues needs-triage labels Jun 2, 2023
@prateekmukhedkar prateekmukhedkar added connectors/source/postgres xmin Postgres xmin replication: issues tagged for xmin feature and removed needs-triage team/connectors-python autoteam labels Jun 2, 2023
@octavia-squidington-iii octavia-squidington-iii added autoteam team/db-dw-sources Backlog for Database and Data Warehouse Sources team labels Jun 2, 2023
@prateekmukhedkar
Copy link
Contributor Author

prateekmukhedkar commented Jun 2, 2023

Connection sync logs.

The state that was written after the first failed attempt:
(note that even though the namespace says otherwise i was syncing the 200m_users.users table containing 200M rows)

[
  {
    "streamDescriptor": {
      "name": "users",
      "namespace": "20m_users"
    },
    "streamState": {
      "num_wraparound": 0,
      "xmin_raw_value": 17384,
      "xmin_xid_value": 17384
    }
  }
]

@prateekmukhedkar prateekmukhedkar changed the title Xmin saving stream state after a failed connection attempt Xmin saving intermediate stream state after a failed connection attempt Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues connectors/source/postgres team/db-dw-sources Backlog for Database and Data Warehouse Sources team type/bug Something isn't working xmin Postgres xmin replication: issues tagged for xmin feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants