rmuir commented on code in PR #851:
URL: https://github.com/apache/lucene/pull/851#discussion_r860619792


##########
lucene/test-framework/src/java/org/apache/lucene/tests/mockfile/HandleLimitFS.java:
##########
@@ -17,16 +17,38 @@
 package org.apache.lucene.tests.mockfile;
 
 import java.io.IOException;
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
 import java.nio.file.FileSystem;
 import java.nio.file.FileSystemException;
 import java.nio.file.Path;
 import java.util.concurrent.atomic.AtomicInteger;
 
-/** FileSystem that throws exception if file handles in use exceeds a 
specified limit */
+/**
+ * FileSystem that throws exception if file handles in use exceeds a specified 
limit.
+ *
+ * @see MaxOpenHandles
+ */
 public class HandleLimitFS extends HandleTrackingFS {
   final int limit;
   final AtomicInteger count = new AtomicInteger();
 
+  /** An annotation */
+  @Documented
+  @Inherited
+  @Retention(RetentionPolicy.RUNTIME)
+  @Target(ElementType.TYPE)
+  public static @interface MaxOpenHandles {
+    // TODO: can we make the default even lower?
+    public static final int MAX_OPEN_FILES = 2048;

Review Comment:
   yeah, as mentioned on the dev list, i don't like to see that we added this 
annotation as escape-mechanism to increase the file count to be even higher.
   
   personally i would prefer 1024 or smaller. I'm using linux 5.17.4 with all 
defaults and my system shows 1024 in ulimit.



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

Reply via email to