Fix Delete TX on JDBCJournalImpl

The JDBC in memory Tx representation was using the Tx ID instead of the
Record ID which was causing deletes to fail.  Also the Store line up
should be set to true as default.


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/fcd98102
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/fcd98102
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/fcd98102

Branch: refs/heads/master
Commit: fcd981027a49090b7ccfacdac5f56f6d3422e0e7
Parents: bff6f12
Author: Martyn Taylor <[email protected]>
Authored: Mon Feb 1 11:00:23 2016 +0000
Committer: Clebert Suconic <[email protected]>
Committed: Mon Feb 1 10:11:35 2016 -0500

----------------------------------------------------------------------
 .../activemq/artemis/jdbc/store/journal/JDBCJournalImpl.java       | 2 +-
 .../activemq/artemis/jdbc/store/journal/JDBCJournalRecord.java     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/fcd98102/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalImpl.java
----------------------------------------------------------------------
diff --git 
a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalImpl.java
 
b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalImpl.java
index ad0f869..82053d4 100644
--- 
a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalImpl.java
+++ 
b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalImpl.java
@@ -301,7 +301,7 @@ public class JDBCJournalImpl implements Journal {
 
       // We actually only need the record ID in this instance.
       if (record.isTransactional()) {
-         RecordInfo info = new RecordInfo(record.getTxId(), 
record.getRecordType(), new byte[0], record.isUpdate(), 
record.getCompactCount());
+         RecordInfo info = new RecordInfo(record.getId(), 
record.getRecordType(), new byte[0], record.isUpdate(), 
record.getCompactCount());
          if (record.getRecordType() == JDBCJournalRecord.DELETE_RECORD_TX) {
             txHolder.recordsToDelete.add(info);
          }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/fcd98102/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalRecord.java
----------------------------------------------------------------------
diff --git 
a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalRecord.java
 
b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalRecord.java
index f5e76a3..bf52a17 100644
--- 
a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalRecord.java
+++ 
b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalRecord.java
@@ -63,7 +63,7 @@ public class JDBCJournalRecord {
 
    // Callback and sync operations
    private IOCompletion ioCompletion = null;
-   private boolean storeLineUp = false;
+   private boolean storeLineUp = true;
    private boolean sync = false;
 
    // DB Fields for all records

Reply via email to