Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-3911

SQL DELETE command left transaction open on 2pm combo installation

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Fix
    • 1.4.3, 1.4.4
    • Icebox
    • DMLProc
    • None

    Description

      Build tested: 1.4.3-4, 1.4.4-1 source

      1.4.4-1

      /root/ColumnStore/buildColumnstoreFromGithubSource/server
      commit ec0071afa50b78930860a14802b8cfc9791f7d13
      Author: Sergei Petrunia <psergey@askmonty.org>
      Date: Thu Mar 26 01:26:39 2020 +0300

      MDEV-21887: federatedx crashes on SELECT ... INTO query in select_handler code

      /root/ColumnStore/buildColumnstoreFromGithubSource/server/engine
      commit 6e953d01d268161ac50dabb6aa9a122ed1d43e0f
      Merge: 4468c93 ba06727
      Author: Gagan Goel <gagan.nith@gmail.com>
      Date: Thu Mar 26 11:41:35 2020 -0400

      Merge pull request #1117 from drrtuy/MCOL-3828_1_4

      MCOL-3828 This commit replaces the method that calls JOIN::optimise()

      On a 2pm combo stack with schema sync enabled, a SQL DELETE command seems to cause two delete operations, the first one with commit and the second one without commit, leaving a transaction open and table locked. INSERT and UPDATE commands has only one operation. The issue does not exist on single-node and 1um2pm installations.

      To reproduce the issue, you can just create a table, insert a row, and delete the row. The transaction will remain open and the table will be locked.

      debug.log

      INSERT

      Mar 30 14:53:12 localhost dmlpackageproc[6904]: 12.898074 |21|2|0| D 21 CAL0001: Start SQL statement: insert into quicktest values (1,'Hello'); |mytest|
      Mar 30 14:53:13 localhost dmlpackageproc[6904]: 13.409266 |21|2|0| D 21 CAL0001: End SQL statement
      Mar 30 14:53:13 localhost dmlpackageproc[6904]: 13.436128 |21|2|0| D 21 CAL0001: Start SQL statement: COMMIT
      Mar 30 14:53:13 localhost dmlpackageproc[6904]: 13.621044 |21|2|0| D 21 CAL0001: End SQL statement
      Mar 30 14:53:13 localhost dmlpackageproc[6904]: 13.657576 |21|3|0| D 21 CAL0001: Start SQL statement: insert into quicktest values (2,'world'); |mytest|
      Mar 30 14:53:13 localhost dmlpackageproc[6904]: 13.832095 |21|3|0| D 21 CAL0001: End SQL statement
      Mar 30 14:53:13 localhost dmlpackageproc[6904]: 13.865166 |21|3|0| D 21 CAL0001: Start SQL statement: COMMIT
      Mar 30 14:53:13 localhost dmlpackageproc[6904]: 13.932600 |21|3|0| D 21 CAL0001: End SQL statement

      UPDATE

      Mar 30 14:53:15 localhost dmlpackageproc[6904]: 15.201499 |21|5|0| D 21 CAL0001: Start SQL statement: update quicktest set c2='My frind' where c2 = 'world';|mytest|
      Mar 30 14:53:15 localhost dmlpackageproc[6904]: 15.307114 |21|5|0| D 21 CAL0001: End SQL statement
      Mar 30 14:53:15 localhost dmlpackageproc[6904]: 15.434659 |21|5|0| D 21 CAL0001: Start SQL statement: COMMIT
      Mar 30 14:53:15 localhost dmlpackageproc[6904]: 15.493072 |21|5|0| D 21 CAL0001: End SQL statement

      DELETE

      Mar 30 14:53:15 localhost dmlpackageproc[6904]: 15.659319 |21|6|0| D 21 CAL0041: Start SQL statement: delete from quicktest where c1=1;|mytest|
      Mar 30 14:53:15 localhost dmlpackageproc[6904]: 15.799276 |21|6|0| D 21 CAL0042: End SQL statement
      Mar 30 14:53:15 localhost dmlpackageproc[6904]: 15.888426 |21|6|0| D 21 CAL0001: Start SQL statement: COMMIT
      Mar 30 14:53:15 localhost dmlpackageproc[6904]: 15.953297 |21|6|0| D 21 CAL0001: End SQL statement
      Mar 30 14:53:16 localhost dmlpackageproc[6904]: 16.161086 |21|7|0| D 21 CAL0041: Start SQL statement: delete from quicktest where c1=2;|mytest|
      Mar 30 14:53:16 localhost dmlpackageproc[6904]: 16.211699 |16777229|8|0| D 21 CAL0001: Txn is waiting for7 delete from quicktest where c1=1;; |mytest| 3000
      Mar 30 14:53:16 localhost dmlpackageproc[6904]: 16.250406 |21|7|0| D 21 CAL0042: End SQL statement
      Mar 30 14:53:16 localhost dmlpackageproc[6904]: 16.359678 |21|7|0| D 21 CAL0001: Start SQL statement: COMMIT
      Mar 30 14:53:16 localhost dmlpackageproc[6904]: 16.359791 |16777229|8|0| D 21 CAL0041: Start SQL statement: delete from quicktest where c1=1;|mytest|
      Mar 30 14:53:16 localhost dmlpackageproc[6904]: 16.455730 |21|7|0| D 21 CAL0001: End SQL statement

      I am not sure what "Txn is waiting..." is. Did it reprocessing DELETE command without a commit?

      Attachments

        Activity

          People

            Unassigned Unassigned
            dleeyh Daniel Lee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.