rmuir commented on code in PR #851:
URL: https://github.com/apache/lucene/pull/851#discussion_r860621619
##########
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:
at the same time, i would prefer we stabilize the tests in jenkins. we can
make followup issues for the filehandle stuff. It is just silly, totally
defeats the purpose of HandleLimitFS if we allow it to go to huge values. The
whole purpose of this delegator is that we can have a limit that works
everywhere to equalize it.
--
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]