msfroh commented on issue #12637: URL: https://github.com/apache/lucene/issues/12637#issuecomment-1763041651
I was curious about this one, and whether it is a bug or intentional. I noticed that the `IndexWriter` constructor that calls `SegmentInfos.replace()` has a comment saying: ```` // Swap out all segments, but, keep metadata in // SegmentInfos, like version & generation, to // preserve write-once. This is important if // readers are open against the future commit // points. ``` I suppose the `userData` isn't metadata, so you might expect it to be replaced too. Also, `replace` is called when we have explicitly said that we want to load an earlier commit when initializing the `IndexWriter`. Part of that earlier commit is its `userData`, right? tl;dr: Yeah -- this sounds like something that got missed. -- 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...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org