mikemccand commented on code in PR #12900: URL: https://github.com/apache/lucene/pull/12900#discussion_r1422705408
########## lucene/core/src/java/org/apache/lucene/codecs/lucene90/blocktree/IntersectTermsEnum.java: ########## @@ -198,6 +204,7 @@ private IntersectTermsEnumFrame pushFrame(int state) throws IOException { } f.arc = arc; + f.outputPrefix = outputAccumulator.bytesRefs(); Review Comment: Hmm shouldn't we sometimes set this `outputPrefix` back to `null`? The frames are re-used, so we could push deep into the FST, where there is an `outputPrefix`, then pop back out and push into a new part of the FST that does not have an `outputPrefix` and illegally share / use the old leftover stale `outputPrefix`? ########## lucene/core/src/java/org/apache/lucene/codecs/lucene90/blocktree/IntersectTermsEnumFrame.java: ########## @@ -89,6 +89,9 @@ final class IntersectTermsEnumFrame { final ByteArrayDataInput bytesReader = new ByteArrayDataInput(); + // Cumulative outputs so far + BytesRef[] outputPrefix; Review Comment: It's sort of strange to have a separate array for tracking the accumulated `BytesRef` outputs when this is the purpose of the `outputAccumulator`? Wouldn't we be able to push/pop as we push/pop the frames, into the single accumulator, so we don't need make extra arrays as we push deeper into the FST? We could assert when we pop that the output we are popping exactly matches (`.equals()`) the `FST.Arc`'s output from that frame. ########## lucene/backward-codecs/src/test/org/apache/lucene/backward_index/TestBackwardsCompatibility.java: ########## @@ -2245,7 +2244,6 @@ public void testFailOpenOldIndex() throws IOException { // #12895: test on a carefully crafted 9.8.0 index (from a small contiguous subset // of wikibigall unique terms) that shows the read-time exception of // IntersectTermsEnum (used by WildcardQuery) - @Ignore("re-enable once we merge #12900") Review Comment: Yay :) -- 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