5 Replies Latest reply on May 29, 2008 10:28 AM by Clebert Suconic

    Some serious issues with new journal code for AIO

    Tim Fox Master

      Further to what Clebert and I discussed yesterday, and in the process of making some small changes to the journal I have discovered several major bugs / issues in the changes that were added to the journal when integrating the AIO journal.

      1) appendAddRecord(final long id, final byte recordType, final EncodingSupport record):

      Why bother with a callback - much easier just to call write with sync = true? (less code)

      2) public void appendAddRecord(final long id, final byte recordType, final byte[] record) throws Exception

      same as 1)

      3) public void appendDeleteRecord(long id) throws Exception

      same as 1)

      4) public void appendAddRecordTransactional(final long txID, final byte recordType, final long id,
      final byte[] record) throws Exception

      Previous code was always using callbacks - even if the journal didn't support callbacks

      5) public void appendUpdateRecordTransactional(final long txID, byte recordType, final long id,
      final byte[] record) throws Exception

      same as 4)

      6) public void appendDeleteRecordTransactional(final long txID, final long id) throws Exception

      Same as 4)

      7) public void appendPrepareRecord(final long txID) throws Exception

      Two bugs in this one
      a) Previous code was always using callbacks - even if the journal didn't support callbacks
      b) Not waiting for completion on prepare

      8) public void appendRollbackRecord(final long txID) throws Exception

      The bug here is that it doesn't wait for completion of all the transactional operations that came before it. It only waits for completion if the current operation

      Some of these are pretty critical bugs, I can only asume the new functionality test coverage isn't sufficient since these weren't caught.