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

Failure of clientrotator.cpp causes DMLProc to lock up

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 1.0.8
    • Icebox
    • DMLProc, ExeMgr, ProcMgr
    • None

    Description

      A java program was written to get around the issue of bulk deleting data in the current partition scheme (SEE https://jira.mariadb.org/browse/MCOL-685 , https://jira.mariadb.org/browse/MCOL-680)

      This program works by doing repeated DELETE sql calls of a certain LIMIT size until the data for a particular column value is gone. The program starts fine and with repeated tries does some number of success deletes until the following occurs:

      SQLState: HY000; Error Code: 1815; Internal error: /home/builder/mariadb-columnstore-server/mariadb-columnstore-engine/dbcon/execplan/clientrotator.cpp: Could not get a connection to a ExeMgr

      Subsequent attempts always fail with the following:

      SQLState: HY000; Error Code: 1815; Internal error: IDB-2009: Unable to perform the delete operation because DMLProc with PID 27675 is currently holding the table lock for session 71

      The problem is resolved by doing at kill -TERM on the DMLProc.

      The program now runs fine again for some number of block deletes until the problem happens again. And again killing the DMLProc resolves the problem temporarily.

      The pertinent section of code doing the delete is the following. The whole program is available if needed for your needs:

      {{ private static void doDelete(Connection connection) {
      String partitionDrop = "SELECT calDropPartitionsByValue('" + database + "','" + table + "','" + column + "'," + //
      "'" + columnValue + "','" + columnValue + "')";

      String deleteRecords = "DELETE FROM " + database + "." + table + //
      " WHERE " + column + "='" + columnValue + "'" + //
      " LIMIT " + batchSize;

      log.info("Creating statement ...");

      try (Statement statement = connection.createStatement()) {
      int numberDeleted = 0;

      // See if we can get rid of alot using the fast method, then take care
      // of the rest using the slow method

      log.info("Executing » " + partitionDrop);
      try (ResultSet rs = statement.executeQuery(partitionDrop))

      { ;// don't care about result }

      catch (Exception e)

      { log.info("Ignoring » " + e); }

      // Now get rid of the rest the hard way

      do

      { log.info("Executing » " + deleteRecords); numberDeleted = statement.executeUpdate(deleteRecords); if (numberDeleted > 0) log.info("Deleted block of " + numberDeleted + " records."); }

      while (numberDeleted > 0);
      }
      catch (SQLException e)

      { exitCode = 1; logSQLException(e); }

      catch (Exception e)

      { exitCode = 1; log.error("Deletion Failure", e); }

      }}}

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              allan.wax Allan
              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.