Details

      Description

      Currently no true LOCK=NONE exists on slave.
      Alter table is first committed on master then it is replicated on slaves.
      The purpose of this task is to create a true LOCK=NONE

      Implementation Idea

      Master will write BEGIN_DDL_EVENT in binlog after it hits ha_prepare_inplace_alter_table.
      Then master will write QUERY_EVENT on binlog with actual alter query .
      On commit/rollback master will write COMMIT_DDL_EVENT/ROLLBACK_DDL_EVENT.

      On slave there will be pool of threads(configurable global variable), which
      will apply these DDLs. On reciving BEGIN_DDL_EVENT slave thread will pass the
      QUERY_EVENT to one of the worker thread. Worker thread will execute untill
      ha_inplace_alter_table. Actual commit_inplace_alter will be called by sql thread.
      If sql thread recieve some kind of rollback event , then it will somehow signal
      worker thread to stop executing alter. If none of the worker threads are avaliable
      then event will be enqueued, then If we recieved rollback event the we will simply
      discard event from queue, If we recieved commit event then SQL thread will syncrolysly
      process DDL event.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sachin.setiya.007 Sachin Setiya
                Reporter:
                sachin.setiya.007 Sachin Setiya
              • Votes:
                4 Vote for this issue
                Watchers:
                14 Start watching this issue

                Dates

                • Created:
                  Updated: