gautamworah96 opened a new pull request, #12465: URL: https://github.com/apache/lucene/pull/12465
While upgrading our Lucene to 9.7 from 9.6 we noticed that a few tests were failing. On digging deeper into the tests we realized that they were failing on a particular assert. This one: ``` if (disi.nextExistDocInBlock > targetInBlock) { assert !disi.exists; return false; } ``` This changes the behavior of this function as compared to the behavior in Lucene 9.6 (and before). It could be possible that we intentionally decided to change the behavior of this function, but to my eye, it feels like that was not the case? I attached a test that shows the assert failing. The test tries to call `advanceExact` which underneath it calls `advanceExactWithinBlock` on a document that is behind the current doc position. In the previous version of Lucene this would return a `false` and would exit. But with the upgrade, it fails mysteriously on an assert. I created this PR because IIUC the assert checks for something that is completely unrelated to the current method call? Why would we want to assert on the existence of a previous document when calling for `advanceExactWithinBlock` on a new document.. My preference here would be to remove just the assert statement and to revert to the previous behavior (of returning false when calling for a document that is behind the current cursor position). I could also be wrong though. Would appreciate a second look from some folks in the community.. Thanks! -- 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