Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-4964

Support MySQL Replication using Global Transaction IDs

    • Icon: Suggestion Suggestion
    • Resolution: Won't Fix
    • None
    • Database - MySQL
    • None
    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      Overview

      MySQL uses Global Transaction Identifiers as part of their replication mechanism. See http://dev.mysql.com/doc/refman/5.6/en/replication-gtids.html

      Issue

      Customers hitting this issue will see a message on the application logs similar to the one below:

      2015-07-07 17:06:16,123 WARN  [http-bio-7990-exec-15] <user> @1Q5I8BYx1026x359x1 1wn1yo6 <IP>,<IP> "DELETE /projects/<SLUG>/repos/<SLUG> HTTP/1.1" o.h.h.s.TemporaryTableBulkIdStrategy unable to drop temporary id table after use [When @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1, the statements CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can be executed in a non-transactional context only, and require that AUTOCOMMIT = 1.]
      

      That happens because of ENFORCE_GTID_CONSISTENCY = 1 on the MySQL database.

      Workaround

      Turn off ENFORCE_GTID_CONSISTENCY on the database.

      Note: This precludes the use of Google Cloud SQL, which enforces the use of GTID

          Form Name

            [BSERV-4964] Support MySQL Replication using Global Transaction IDs

            Hibernate, which is used for all database interactions in Bitbucket Server, does not support GTIDs (See HHH-9289) Running Bitbucket Server connected to MySQL with GTIDs enabled will not be possible until such time as either:

            • Hibernate makes changes to support for GTIDs or
            • MySQL adjusts the limitations of using temporary tables with GTIDs enabled

            Pragmatically, rewriting our entire database layer to not use Hibernate purely to support GTIDs on MySQL, a configuration used by a very small subset of installs on one of our 7 supported RDBMSes, is not a viable product decision.

            Best regards,
            Bryan Turner
            Atlassian Bitbucket

            Bryan Turner (Inactive) added a comment - Hibernate, which is used for all database interactions in Bitbucket Server, does not support GTIDs (See HHH-9289 ) Running Bitbucket Server connected to MySQL with GTIDs enabled will not be possible until such time as either: Hibernate makes changes to support for GTIDs or MySQL adjusts the limitations of using temporary tables with GTIDs enabled Pragmatically, rewriting our entire database layer to not use Hibernate purely to support GTIDs on MySQL, a configuration used by a very small subset of installs on one of our 7 supported RDBMSes, is not a viable product decision. Best regards, Bryan Turner Atlassian Bitbucket

            Hi Bitbucket team, few years passed since this issue has been raised.
            We still have some problems with this. Please see Oracle response about it :


            Indeed, GTID no longer allows some of the bad development practices
            The only permanent solution is to correct the bitbucket code because the proposed workaround is in my opinion not one because without GTID no automated failover

            Deleted Account (Inactive) added a comment - Hi Bitbucket team, few years passed since this issue has been raised. We still have some problems with this. Please see Oracle response about it : Indeed, GTID no longer allows some of the bad development practices The only permanent solution is to correct the bitbucket code because the proposed workaround is in my opinion not one because without GTID no automated failover

              Unassigned Unassigned
              jpalacios Juan Palacios (Inactive)
              Votes:
              10 Vote for this issue
              Watchers:
              16 Start watching this issue

                Created:
                Updated:
                Resolved: