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

Large numbers of ROLLBACK transactions can lead to memory leak when LOB is not enabled.

XMLWordPrintable

      The Oracle connector maintains several caches, one of which keeps track of recently processed transactions. This cache is important specifically when LOB processing is enabled; however, this cache should not be used when LOB processing is disabled.

      Unfortunately, when a ROLLBACK is detected, the finalizeTransactionRollback handler is called and this handler will in turn incorrectly add the rolled back transaction to this cache. Since this cache is not expected to contain any entries when LOB is disabled, the cache is never cleared at any point, leading to a memory leak. More critically, this impairs performance as this cache is consulted when handling START, COMMIT, and DML events and if excessive numbers of records exist and the cache continues to grow, this will lead to degradation of performance due to the lookup cost in such a large cache.

      The finalizeTransactionRollback handler should only inject a record into this cache if and only if the LOB support has been enabled in the connector configuration.

              ccranfor@redhat.com Chris Cranford
              ccranfor@redhat.com Chris Cranford
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: