XADisk transaction logs folder keeps growing...

52 views
Skip to first unread message

Hobo Joe

unread,
May 28, 2015, 10:27:50 AM5/28/15
to xad...@googlegroups.com
This is must be related to  https://groups.google.com/forum/#!topic/xadisk/oJBK47CiyJM

My txnlogs subdirectory never gets cleaned up.

I downloaded the 1.2.2 source and debug the code to the point of being in TransactionLogsUtility.java:deleteLogsIfPossible

This method
ArrayList<Integer> logsOccupied = transactionsAndLogsOccupied.get(xid);
if (logsOccupied == null) {
return;
}

always returns null. I attached a screen show which will show the values of the methods variables.


I get no errors in the xadisk.log file.
Capture.PNG

Hobo Joe

unread,
May 28, 2015, 10:54:36 AM5/28/15
to xad...@googlegroups.com
Also, I am using the very latest from trunk so I should have the  #154 fix.

Hobo Joe

unread,
May 28, 2015, 11:21:59 AM5/28/15
to xad...@googlegroups.com


On Thursday, May 28, 2015 at 10:27:50 AM UTC-4, Hobo Joe wrote:
Also, if I do a clean shutdown and restart the old logs are cleaned up. I am running on windows and initialize my XADisk as a bootNativeXAFileSystem

Nitin Verma

unread,
May 30, 2015, 3:20:46 AM5/30/15
to xad...@googlegroups.com, stvgo...@gmail.com
Hi Hobo,

The map transactionsAndLogsOccupied is expected to contain one entry per transaction, with xid as its key. The first time a transaction's log is written to the log, an entry is created inside this map (*1). And when a transaction commits/rollsback, that entry is removed (*2). These are the only two places for the transaction's entry to enter/exit this map. The code places are:
*1 TransactionLogsUtility.trackTransactionLogsUsage: "transactionsAndLogsOccupied.put(xid, logsOccupied);"
*2 GatheringDiskWriter.cleanupTransactionInfo: "transactionsAndLogsOccupied.remove(xid);".

Do you find this issue intermittent or frequent? If you can reproduce this with a simple test-case, and send the details to me, I can diagnose locally.

You can also try to debug why this map has the entry missing - it is generally not expected. Has this xid's entry even entered into the map earlier? Does the map contain entries for other transactions? Is this issue happening for some specific types of transaction? Are your xid's unique?

I think the problem here must be different that issue#154. Please let me know how your analysis proceeds.

Thanks,
Nitin
Reply all
Reply to author
Forward
0 new messages