Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging in WorkflowRun.LOADING_RUNS #490

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,7 @@ private String key() {

/** Hack to allow {@link #execution} to use an {@link Owner} referring to this run, even when it has not yet been loaded. */
@Override public void reload() throws IOException {
LOGGER.fine(() -> "Adding " + key() + " to LOADING_RUNS");
synchronized (LOADING_RUNS) {
LOADING_RUNS.put(key(), this);
}
Expand Down Expand Up @@ -612,6 +613,7 @@ private String key() {
}
} finally { // Ensure the run is ALWAYS removed from loading even if something failed, so threads awaken.
checkouts(null); // only for diagnostics
LOGGER.fine(() -> "Removing " + key() + " from LOADING_RUNS");
synchronized (LOADING_RUNS) {
LOADING_RUNS.remove(key()); // or could just make the value type be WeakReference<WorkflowRun>
LOADING_RUNS.notifyAll();
Expand Down
Loading