You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/04/28 08:20:55 UTC

[GitHub] [lucene] uschindler commented on a diff in pull request #851: LUCENE-10088: backport simple text codec suppression and fs handle limit

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


##########
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:
   Jenkins set this limit to 2048 on OS level, too. So tests using a greater one and using FSDirectory may fail.



-- 
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-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org