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

mcsapi should have view/clear table lock features

Details

    • New Feature
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 1.2.2
    • None
    • None
    • 2018-20

    Description

      You can't start a transaction when a table lock exists so there should be functionality to view and clear table locks, thereby rolling back transactions stuck due to crashes in applications using mcsapi.

      Discussed in MCOL-1077

      Attachments

        1. javamcsapi_html.zip
          271 kB
        2. javamcsapi_usage.pdf
          237 kB
        3. libmcsapi_html.zip
          264 kB
        4. libmcsapi_usage.pdf
          257 kB
        5. pymcsapi_html.zip
          251 kB
        6. pymcsapi_usage.pdf
          232 kB

        Issue Links

          Activity

            jens.rowekamp Jens Röwekamp (Inactive) added a comment - - edited

            4 functions shall be implemented to view and clear table locks in ColumnStoreDriver

            • listTableLocks() , returns all current table locks in an array of [lockId, sessionId, database, table]
            • isTableLocked(std::string database, std::string table), returns true if the table is locked by another process and false if not
            • clearTableLock(uint16_t id), clears a table lock with the specific lock Id and rolls back the killed transaction
            • clearTableLock(std::string database, std::string table), clears a table lock for the specified database table combination and rolls back the killed transaction
            jens.rowekamp Jens Röwekamp (Inactive) added a comment - - edited 4 functions shall be implemented to view and clear table locks in ColumnStoreDriver listTableLocks() , returns all current table locks in an array of [lockId, sessionId, database, table] isTableLocked(std::string database, std::string table), returns true if the table is locked by another process and false if not clearTableLock(uint16_t id), clears a table lock with the specific lock Id and rolls back the killed transaction clearTableLock(std::string database, std::string table), clears a table lock for the specified database table combination and rolls back the killed transaction
            jens.rowekamp Jens Röwekamp (Inactive) added a comment - - edited

            Introducing 6 new functions to ColumnStoreDriver:

            • std::vector listTableLocks();
            • bool isTableLocked(const std::string & db, const std::string & table, TableLockInfo& rtn);
            • bool isTableLocked(const std::string & db, const std::string & table);
            • void clearTableLock(uint64_t lockId);
            • void clearTableLock(const std::string & db, const std::string & table);
            • void clearTableLock(TableLockInfo tbi);

            Introducing a new datatype mcsapi::TableLockInfo to store table lock information.

            mcsapi's introduced functions and data types ported to pymcsapi and javamcsapi

            Introducing C++, Java, and Python tests for listTableLocks(), isTableLocked(), and clearTableLock()

            Added new functions to documentation plus general documentation updates for javamcsapi and pymcsapi

            Known limitations:

            • mcsapi's isTableLocked() function is affected by MCOL-1218 and only detects locks of tables that were existent when the ColumnStoreDriver was initialized
            • javamcsapi and pymcsapi don't yet have methods to access the dbroot array returned by TableLockInfo's getDbrootList()
            • javamcsapi and pymcsapi don't yet have methods to access the the creation time returned by TableLockInfo's getCreationTime()
            • pymcsapi's isTableLocked() function only returns bool but not also the additional TableLockInfo object mcsapi returns

            Limitations addressed in MCOL-1961

            For QA

            • run regression test suite on CentOS 7, Windows 10, and one Debian/Ubuntu
            • verify that the documentation is correct
            jens.rowekamp Jens Röwekamp (Inactive) added a comment - - edited Introducing 6 new functions to ColumnStoreDriver: std::vector listTableLocks(); bool isTableLocked(const std::string & db, const std::string & table, TableLockInfo& rtn); bool isTableLocked(const std::string & db, const std::string & table); void clearTableLock(uint64_t lockId); void clearTableLock(const std::string & db, const std::string & table); void clearTableLock(TableLockInfo tbi); Introducing a new datatype mcsapi::TableLockInfo to store table lock information. mcsapi's introduced functions and data types ported to pymcsapi and javamcsapi Introducing C++, Java, and Python tests for listTableLocks(), isTableLocked(), and clearTableLock() Added new functions to documentation plus general documentation updates for javamcsapi and pymcsapi Known limitations: mcsapi's isTableLocked() function is affected by MCOL-1218 and only detects locks of tables that were existent when the ColumnStoreDriver was initialized javamcsapi and pymcsapi don't yet have methods to access the dbroot array returned by TableLockInfo's getDbrootList() javamcsapi and pymcsapi don't yet have methods to access the the creation time returned by TableLockInfo's getCreationTime() pymcsapi's isTableLocked() function only returns bool but not also the additional TableLockInfo object mcsapi returns Limitations addressed in MCOL-1961 For QA run regression test suite on CentOS 7, Windows 10, and one Debian/Ubuntu verify that the documentation is correct

            People

              winstone Zdravelina Sokolovska (Inactive)
              LinuxJedi Andrew Hutchings (Inactive)
              Votes:
              1 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.