franferta / jdbm2

Automatically exported from code.google.com/p/jdbm2
0 stars 0 forks source link

.t file not deleted. #11

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a JDBM recordManager
2. Create and Htree Instance.
3. Put values, commit, close.
4. Close transaction.
Running this simply from a main method does not reproduce this problem, but 
when running it in a web application with concurrent access creates a problem. 
The .t file fails to be deleted.

What is the expected output? What do you see instead?
.t file which is used for logging transactions should be deleted. It does not, 
since the FileInputStream & ObjectInputStream has not been closed.

What version of the product are you using? On what operating system?
JDBM, which is a inactive project. Same problem in JDBM2 code. Windows 7, JDK 
6.26.

Please provide any additional information below.
Problem exists in the recover() method present in the TransactionManager class. 
This method is called from the TrnsactionManager Constructor. The recover() 
method creates a .t file for logging transactions, but fails to close the 
inputStream before trying to delete it. Hence it fails.

If possible, please fix in JDBM, which creates a .lg file instead of a .t file, 
as well.

Original issue reported on code.google.com by varun...@gmail.com on 17 Nov 2011 at 6:22

GoogleCodeExporter commented 8 years ago
Forgot to mention that closing the inputStreams, fixes the issue.

Original comment by varun...@gmail.com on 17 Nov 2011 at 6:25

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r82.

Original comment by kja...@gmail.com on 19 Dec 2011 at 8:50

GoogleCodeExporter commented 8 years ago
There is new release 2.3 with fix

Original comment by kja...@gmail.com on 19 Dec 2011 at 10:25