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

Transaction left open after db snapshot

XMLWordPrintable

    • 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 .

      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.

              Unassigned Unassigned
              grant.cooksey Grant Cooksey (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: