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

Pending transaction should filter schema name

XMLWordPrintable

    • False
    • None
    • False

      Feature request or enhancement

      For feature requests or enhancements, provide this information, please:

      Which use case/requirement will be addressed by the proposed feature?

      When I set interal.log.mining.transaction.snapshot.boundary.mode to transaction_view_only or all, Debezium queries V$TRANSACTION and get lowest SCN and use it for initial streaming. 

      If you a long running transaction in any schema in your DB, it will make others connector (that capturing other schemas) be slowed. 

      In my case there was an test transaction from unrelated schema and I found out that select query also create a transaction (transaction was created by metabase in my case).

      Refer: https://stackoverflow.com/questions/49455629/does-select-start-transaction-in-pl-sql

      Implementation ideas (optional)

      You should join V$TRANSACTION and V$SESSION to filter schema name.

      SELECT t.XID,
             s.SERVICE_NAME,
             s.SCHEMANAME,
             t.START_DATE,
             t.START_SCN,
             s.USERNAME,
             s.STATUS,
             s.OSUSER,
             s.MACHINE
      from V$TRANSACTION t
               JOIN V$SESSION s on t.SES_ADDR = s.SADDR; 

            ccranfor@redhat.com Chris Cranford
            thangdc94@gmail.com Phạm Thắng (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: