[Neo tickets] #316: Lock on messages.log is not released on Windows

neo4j.org noreply at neo4j.org
Fri Feb 18 19:09:07 CET 2011


#316: Lock on messages.log is not released on Windows
------------------------------------+---------------------------------------
 Reporter:  gael.marziou at gmail.com  |       Owner:  johans
     Type:  bug report              |      Status:  new   
 Priority:  minor                   |   Milestone:        
Component:  kernel                  |    Keywords:        
------------------------------------+---------------------------------------
 We are running 1.2 version.

 This bug occurs on Windows only due to hard-coded '/' in logger filename.

 Both TxManager and XaLogicalLog use StringLogger with file messages.log
 but they build the complete file path in a different way.

 TxManager:
   this.msgLog = StringLogger.getLogger( txLogDir + "/messages.log" );

 XaLogicalLog:
   msgLog = StringLogger.getLogger( new File( storeDir, "messages.log"
 ).getPath() );


 On Windows, the XaLogicalLog creates a logger with "\\messages.log" while
 TxManager creates it with "/messages.log".
 As StringLogger uses a Map indexed on filename, it results in creating 2
 loggers.

 When shutting down the Db, only TxManager stops the StringLogger, so
 XaLogicalLog holds the file handle and prevents file deletion in unit
 tests for instance.

 I think that TxManager and XaLogicalLog should build their StringLogger
 the same way (probably like XaLogicalLog)

-- 
Ticket URL: <https://trac.neo4j.org/ticket/316>
neo4j.org <http://trac.neo4j.org/>
The Neo4J.org Issue Tracker


More information about the Tickets mailing list