uschindler commented on code in PR #13570:
URL: https://github.com/apache/lucene/pull/13570#discussion_r1682619481
##########
lucene/core/src/java/org/apache/lucene/index/IndexFileNames.java:
##########
@@ -142,6 +143,26 @@ public static String stripSegmentName(String filename) {
return filename;
}
+ /**
Review Comment:
Hi,
I think the parseLong is too special, there is also a pattern to validate
codec-generated filenames:
https://github.com/apache/lucene/blob/29fe87f08716bd8820a0a43f458d5a797a954f0c/lucene/core/src/java/org/apache/lucene/index/IndexFileNames.java#L220
We should use this one, if it does not match the pattern, we should return a
shared segment.
In addition about deletions and in-place updates: There is the ability to
extract the "generation" of a file. If the generation is not 0, the file is an
update to an already existing segment (like new deletions and docvalues
updates). As those should not be stay open forever, those should be a separate
key. Or alternatively handle all files with generation!=0 as a separate shared
arena.
so ideally we should create the key from the sgement name and the
generation. :-)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]