thecoop commented on code in PR #14482:
URL: https://github.com/apache/lucene/pull/14482#discussion_r2055496607


##########
lucene/core/src/java/org/apache/lucene/store/Directory.java:
##########
@@ -79,6 +83,31 @@ public abstract class Directory implements Closeable {
    */
   public abstract long fileLength(String name) throws IOException;
 
+  protected void validateIOContext(IOContext context) {

Review Comment:
   A more useful implementation can be found 
[here](https://github.com/apache/lucene/pull/14510/files#diff-a320c032354752cddf187b571d2832ca7a0dcfee5a1f3bda19578e2559338f8b).
 There are a couple of reasons for putting it here:
   
   - I wanted it on `Directory` so that `IOContext` is just a data transfer 
object, it is not opinionated on what it holds - `Directory` and subclasses 
contains all the logic for validating and using hints.
   - Overrides of `Directory` can override this to specify their own validation 
logic for any new hints they use themselves



-- 
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

Reply via email to