This closes #3042
This commit is contained in:
commit
265c8f054d
|
@ -232,6 +232,7 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
holder = transactions.get(record.getTxId());
|
||||
for (RecordInfo info : holder.recordsToDelete) {
|
||||
deletedRecords.add(record.getId());
|
||||
deletedRecords.add(info.id);
|
||||
deleteJournalRecords.setLong(1, info.id);
|
||||
deleteJournalRecords.addBatch();
|
||||
}
|
||||
|
|
|
@ -178,6 +178,19 @@ public class JDBCJournalTest extends ActiveMQTestBase {
|
|||
assertEquals(0, journal.getNumberOfRecords());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCleanupTxRecords4TransactionalRecords() throws Exception {
|
||||
// add committed transactional record e.g. paging
|
||||
journal.appendAddRecordTransactional(152, 154, (byte) 13, new byte[0]);
|
||||
journal.appendCommitRecord(152, true);
|
||||
assertEquals(2, journal.getNumberOfRecords());
|
||||
|
||||
// delete transactional record in new transaction e.g. depaging
|
||||
journal.appendDeleteRecordTransactional(236, 154);
|
||||
journal.appendCommitRecord(236, true);
|
||||
assertEquals(0, journal.getNumberOfRecords());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCallbacks() throws Exception {
|
||||
final int noRecords = 10;
|
||||
|
|
Loading…
Reference in New Issue