You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by AsterixDB Code Review <do...@asterix-gerrit.ics.uci.edu> on 2026/10/05 20:09:20 UTC

[S] Change in asterixdb[master]: [NO ISSUE][HYR] Document the job lifecycle thread

From Ali Alsuliman <al...@gmail.com>:

Ali Alsuliman has uploaded this change for review. ( https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21997?usp=email )


Change subject: [NO ISSUE][HYR] Document the job lifecycle thread
......................................................................

[NO ISSUE][HYR] Document the job lifecycle thread

- user model changes: no
- storage format changes: no
- interface changes: no

Details: Job lifecycle notifications are delivered on the cluster
controller's work queue thread, the same thread that answers the
synchronous client calls. A listener that blocks, or that waits for a
lock another thread holds across such a call, therefore stalls or
deadlocks the job manager. Nothing at the listener said so.

Generated-by: Claude Opus 5.5 <no...@anthropic.com>
Change-Id: Ib50bd1b3a031039899b4d3b0f2ef2310eed6561c
---
M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/api/IClientRequest.java
M hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/IJobLifecycleListener.java
2 files changed, 9 insertions(+), 1 deletion(-)



  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/97/21997/1

diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/api/IClientRequest.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/api/IClientRequest.java
index 1b29f00..351ab9a 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/api/IClientRequest.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/api/IClientRequest.java
@@ -123,6 +123,7 @@
 
     /**
      * Called when the job is created.
+     * Delivered on the job manager's thread: see {@link org.apache.hyracks.api.job.IJobLifecycleListener}.
      *
      * @param jobId the job id
      * @param requiredClusterCapacity the required resources by the job
@@ -133,6 +134,7 @@
 
     /**
      * Called when the job starts running.
+     * Delivered on the job manager's thread: see {@link org.apache.hyracks.api.job.IJobLifecycleListener}.
      *
      * @param jobId the job id
      */
@@ -140,6 +142,7 @@
 
     /**
      * Called when the job finishes.
+     * Delivered on the job manager's thread: see {@link org.apache.hyracks.api.job.IJobLifecycleListener}.
      *
      * @param jobId the job id
      * @param jobStatus the final job status
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/IJobLifecycleListener.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/IJobLifecycleListener.java
index 9bd46b6..202a7df 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/IJobLifecycleListener.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/IJobLifecycleListener.java
@@ -24,7 +24,12 @@
 import org.apache.hyracks.api.job.resource.IJobCapacityController;
 
 /**
- * A listener for job related events
+ * A listener for job related events.
+ * <p>
+ * Every notification is delivered on the cluster controller's work queue thread, the one thread that runs the
+ * job manager. An implementation must not block, nor wait on anything that needs that thread: a synchronous call
+ * through {@link org.apache.hyracks.api.client.IHyracksClientConnection}, or a lock that another thread holds across
+ * such a call. The job manager otherwise stalls, or deadlocks.
  */
 public interface IJobLifecycleListener {
     /**

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21997?usp=email
To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: Ib50bd1b3a031039899b4d3b0f2ef2310eed6561c
Gerrit-Change-Number: 21997
Gerrit-PatchSet: 1
Gerrit-Owner: Ali Alsuliman <al...@gmail.com>