hadoop-hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carl Steinbach (JIRA)" <j...@apache.org>
Subject [jira] Created: (HIVE-1679) MetaStore does not detect and rollback failed transactions
Date Fri, 01 Oct 2010 08:07:33 GMT
MetaStore does not detect and rollback failed transactions

                 Key: HIVE-1679
                 URL: https://issues.apache.org/jira/browse/HIVE-1679
             Project: Hadoop Hive
          Issue Type: Bug
          Components: Metastore
    Affects Versions: 0.5.0, 0.6.0, 0.7.0
            Reporter: Carl Steinbach

Most of the methods in HiveMetaStore and ObjectStore adhere to the following idiom when 
interacting with the ObjectStore:

boolean success = false;
try {
  /* do some stuff */
  success = ms.commitTransaction();
} finally {
  if (!success) {

The problem with this is that ObjectStore.commitTransaction() always returns TRUE:

  public boolean commitTransaction() {
    assert (openTrasactionCalls >= 1);
    if (!currentTransaction.isActive()) {
      throw new RuntimeException(
          "Commit is called, but transaction is not active. Either there are"
              + " mismatching open and close calls or rollback was called in the same trasaction");
    if ((openTrasactionCalls == 0) && currentTransaction.isActive()) {
      transactionStatus = TXN_STATUS.COMMITED;
    return true;

Consequently, the transaction appears to always succeed and ObjectStore is never
directed to rollback transactions that have actually failed. 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message