oehme opened a new pull request, #1281:
URL: https://github.com/apache/maven-mvnd/pull/1281

   The previous implementation used a memory-mapped file, which is not 
guaranteed to reflect changes made by other processes, like expanding the file 
content. Memory mapping only makes sense for large files. The overhead of 
memory mapping for small files is bigger than simply reading it.
   
   Replaced the memory mapping with a DataInputStream-based implementation and 
added a concurrency test, which failed with the previous implementation and 
passes with the new one.
   
   The test expectation for the "big registry" test has changed, since we no 
longer manually increase the file size to multiples of two, but instead simply 
write out exactly the bytes we need.
   
   I droped the String size requirement, since DataInputStream handles 
arbitrarly long Strings. I also changed the exception handling to consistently 
do recovery on any kind of exception while reading/writing, since it is 
reasonable to assume that any such exception indicates a broken registry file. 
I've also adjusted the user-facing message to only tell them to delete the file 
if recovery fails.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to