Uploaded image for project: 'Apache Gobblin'
  1. Apache Gobblin
  2. GOBBLIN-2096

retry Transient SQL Exception for MALA

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • gobblin-service
    • None

    Description

      We're seeing a MySQLTransactionRollbackException: Deadlock found when trying to get lock when calling MysqlMultiActiveLeaseArbiter. attemptLeaseIfNewRow() in the rare case when two hosts check the lease arbiter table at the same time, see there's no entry matching the current primary key and try to insert it at the exact same time (both wait for lock on the same row). Normally, there's slight discrepancy that results in an IntegrityConstraintViolationException if one insert succeeds before the other OR one finishes the write early and the other sees the entry when reading the getResult of the arbiter table. This PR adds retries with exponential backoff for transient SQL exceptions to the insert statement. Note, it's not needed for other cases when the INSERT/UPDATE statements are conditional on a read value.

      Attachments

        Activity

          People

            abti Abhishek Tiwari
            umustafi Urmi Mustafi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 10m
                1h 10m