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

mcsapi stale transactions

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.1.6
    • 1.1.7, 1.2.3
    • None
    • None
    • 2018-21, 2019-01, 2019-02, 2019-03

    Description

      From sasha in MCOL-1077:

      Alas, the problem is not fully resolved. Here is my test sequence:

      1) On one Ubuntu 18.04 docker node I installed ColumnStore server 1.1.6 postConfigured as a multi-server (with a single node).
      2) On another Ubuntu 18.04 docker node I installed ColumnStore C++ BulkWrite SDK source from columnstore-1.1.6.tar.gz
      I also copied the Columnstore.xml from the server node to the api node.
      The unmodified basic_bulk_insert example worked as expected, while inserting remotely.

      I modified the basic_bulk_insert.cpp adding the sleep(10) equivalent by adding three lines as shown below:

      ...
      #include <iostream>
      #include <chrono>
      #include <thread>
       
      int main(void)
      ...
      	std::this_thread::sleep_for(std::chrono::seconds(10));
              bulk->commit();
      ...
      

      Then launched the "sleeping" basic_bulk_insert and terminated this process with kill -9.
      As expected, the ColumnStore server left with the table lock:

      /usr/local/mariadb/columnstore/bin/viewtablelock
       There is 1 table lock
       
        Table    LockID  Process  PID  Session  Txn  CreationTime              State    DBRoots  
        test.t1  26      mcsapi   410  127693   10   Mon Sep 17 01:23:22 2018  LOADING  1        
      

      Also the second (original) basic_bulk_insert attempt resulted in

      /usr/local/share/doc/mcsapi/example/basic_bulk_insert
      Error caught: Table already locked by PID: 410 'mcsapi' session ID: 127693 txn ID: 10
      

      As Andrew directed above, I cleared this lock on the server side with:

      /usr/local/mariadb/columnstore/bin/cleartablelock 26
      Rolling back and clearing table lock for table test.t1; table lock 26
       
      Sending rollback request to PM1...
      Successful rollback response from PM1
      Sending cleanup request to PM1...
      Successful cleanup response from PM1
       
      Table lock 26 for table test.t1 is cleared.
       
      /usr/local/mariadb/columnstore/bin/viewtablelock
       No tables are locked in the database.
      

      After clearing the lock, the (original) basic_bulk_insert attempt was successful.

      Unfortunately, the problem reported above, remains.

      mcsadmin shutdown y
      shutdownsystem   Mon Sep 17 01:32:28 2018
       
      This command stops the processing of applications on all Modules within the MariaDB ColumnStore System
       
         Checking for active transactions
       
         There are active transactions being processed
      Your options are:
          Cancel    -- Cancel the shutdown request
          Wait      -- Wait for write operations to end and then shutdown
          Force     -- Force a shutdown
      What would you like to do: [Cancel]:
      

      As earlier, the rollback -p command does not print any transactions and there is no file /usr/local/mariadb/columnstore/data1/systemFiles/dataTransaction

      Attachments

        Issue Links

          Activity

            People

              winstone Zdravelina Sokolovska (Inactive)
              LinuxJedi Andrew Hutchings (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.