Uploaded image for project: 'Apache Trafodion (Retired)'
  1. Apache Trafodion (Retired)
  2. TRAFODION-3092

Incorrect rowcount reported after commit conflict error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.3
    • sql-exe
    • None

    Description

      When there are 2 sessions doing concurrent SQL IUD operations like update or insert, a commit conflict can occur. When this error occurs, the rowcount reposrted by the SQL diagnostics is incorrect. Even though 0 rows got inserted, it reports 2 rows. Same for updates. 

       

      >>insert into tl values (5,5),(6,6);
      ..

      Breakpoint 3, BEGINTX (pp_tag=0x7ffff7e75c58, pv_timeout=-1, pv_type_flags=1)
      at tmlib.cpp:923
      923 TM_Transaction *lp_trans = NULL;
      (gdb) c
      Continuing.

      Breakpoint 5, ExTransaction::commitTransaction (this=0x7ffff7e75b80, waited=0)
      at ../executor/ex_transaction.cpp:645
      645 dp2Xns_ = FALSE;
      (gdb) c
      Continuing.

      Breakpoint 6, ComDiagsArea::insertNewError (this=0x7ffff7e98048)
      at ../export/ComDiags.cpp:2756
      2756 errors_.insert(newCondition_);
      (gdb) c
      Continuing.

      Breakpoint 6, ComDiagsArea::insertNewError (this=0x7ffff7ef4408)
      at ../export/ComDiags.cpp:2756
      2756 errors_.insert(newCondition_);
      (gdb) c
      Continuing.

          • ERROR[8616] A conflict was detected during commit processing. Transaction has been aborted. Detail :org.trafodion.dtm.TransactionManagerException: org.apache.hadoop.hbase.coprocessor.transactional.CommitConflictException: java.io.IOException: This Transaction [[transactionId: 257 regionTX: false status: PENDING neverReadOnly: false scan Size: 4 write Size: 2 startSQ: 9 prepareEditSize: 0 endEditSize: 0 editSize: 2]] has a scan, scanRange[startRow: \x80\x00\x00\x05, endRow: \x80\x00\x00\x05] that conflicts with a committed Transaction [[transactionId: 258 regionTX: false status: COMMITED neverReadOnly: false scan Size: 4 write Size: 2 startSQ: 9 prepareEditSize: 2 endEditSize: 1 editSize: 2 commitedSQ:9]] which , inserted a row with key[\x80\x00\x00\x05], in the region [TRAFODION.SEABASE.TL,,1527701720547.2d9b1459c2f326be937f14e414cc68ad.]
            org.trafodion.dtm.HBaseTxClient.prepareCommit(HBaseTxClient.java:525)

      — 2 row(s) inserted.
      >>

      Attachments

        Activity

          People

            sandhya Sandhya Sundaresan
            sandhya Sandhya Sundaresan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: