[ 
https://issues.apache.org/jira/browse/TIKA-4839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18108931#comment-18108931
 ] 

ASF GitHub Bot commented on TIKA-4839:
--------------------------------------

Copilot commented on code in PR #3081:
URL: https://github.com/apache/tika/pull/3081#discussion_r3874566985


##########
tika-pipes/tika-pipes-core/src/main/java/org/apache/tika/pipes/core/ServerManager.java:
##########
@@ -95,61 +95,28 @@ public interface ServerManager extends Closeable {
      */
     java.nio.file.Path getTempDirectory();
 
-    /**
-     * Marks the server for restart due to a fatal error (OOM, timeout, etc.).
-     * <p>
-     * This is called by clients when they receive a fatal error status from 
the server.
-     * It signals that the server process is stopping, even if {@link 
#isRunning()}
-     * might still return true briefly. The next call to {@link 
#ensureRunning()} will
-     * wait for the process to fully exit and then restart.
-     * <p>
-     * The reason form below defaults to this one, so this must NOT default to 
the reason form:
-     * an implementation overriding neither would recurse until the stack 
blew. Concrete managers
-     * in tika-pipes override both, so callers of either spelling reach a real 
implementation.
-     */
-    default void markServerForRestart() {
-        // Default no-op: preserves implementations written before 
RestartReason existed.
-    }
-
-    /** As {@link #markServerForRestart()}, attributing the restart to {@code 
reason}. Override this one. */
-    default void markServerForRestart(RestartReason reason) {
-        markServerForRestart();
-    }
-
     /**
      * The generation of the currently running process: a counter incremented 
every time this
      * manager forks a replacement. A client captures it when it connects and 
hands it back with
      * every report, so a report about a process that has already been 
replaced can be recognised
      * and dropped rather than being applied to its healthy successor.
      */
-    default long getGeneration() {
-        return 0;
-    }
-
-    /**
-     * As {@link #markServerForRestart(RestartReason)}, but only if {@code 
generation} is still
-     * current. Reports about a superseded process are dropped.
-     */
-    default void markServerForRestart(RestartReason reason, long generation) {
-        markServerForRestart(reason);
-    }
+    long getGeneration();
 
     /**
-     * The reasonless spelling of the above, kept for callers that cannot 
attribute the failure.
-     * Routed through the reason form rather than the bare no-arg default: 
that default exists
-     * only to keep pre-RestartReason implementations working, and delegating 
here would leave
-     * this silently inert for any implementation that overrides only the 
reason form.
-     */
-    default void markServerForRestart(long generation) {
-        markServerForRestart(RestartReason.CRASH, generation);
-    }
-
-    /**
-     * As {@link #handleCrashAndGetExitCode()}, but only if {@code generation} 
is still current.
+     * Marks the server for restart due to a fatal error, attributed to {@code 
reason}, but only
+     * if {@code generation} is still current 

> Add Micrometer/Prometheus metrics to tika-server
> ------------------------------------------------
>
>                 Key: TIKA-4839
>                 URL: https://issues.apache.org/jira/browse/TIKA-4839
>             Project: Tika
>          Issue Type: Task
>            Reporter: Tim Allison
>            Priority: Major
>
> Now that we have a reliable back-pressure signal in tika-server, let's add a 
> Micrometer registry with a Prometheus scrape endpoint on a separate port so 
> that we can publish stats for potential auto-scaling triggers.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to