Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-1564

Transaction left open after db snapshot

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 0.10.0.Final
    • Fix Version/s: 1.0.0.Beta2
    • Component/s: postgresql-connector
    • Labels:
      None
    • Environment:

      Tested on pg 10 and pg 9.6. Only affects the debezium 0.10 release

    • Steps to Reproduce:
      Hide

      Start a 0.10 connector that takes a snapshot of a pg database.
      Once the snapshot is finished and streaming has started, check pg_stat_activity for the JDBC Driver connection debezium holds open.
      Verify that the state is idle in transaction.

      Show
      Start a 0.10 connector that takes a snapshot of a pg database. Once the snapshot is finished and streaming has started, check pg_stat_activity for the JDBC Driver connection debezium holds open. Verify that the state is idle in transaction .

      Description

      After taking a snapshot on a postgres db, a transaction remains open on connection that debezium holds open. Post snapshot, pg_stat_activity shows a row for the debezium connection that is in a state of idle in transaction. Ex:

      application_name    |        state        |                                                                     query                                                                      
      ------------------------+---------------------+------------------------------------------------------------------------------------------------------------------------------------------------
       PostgreSQL JDBC Driver | idle in transaction | SELECT relreplident FROM pg_catalog.pg_class c LEFT JOIN pg_catalog.pg_namespace n ON c.relnamespace=n.oid WHERE n.nspname=$1 and c.relname=$2
      

      There is a workaround, if the connector is deleted and restarted after the snapshot is finished, the state is idle.

      It appears this issue only affects the 0.10 release.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                grant.cooksey Grant Cooksey
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: