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

[WFLY-12896] EE Concurrency Hung Tasks Termination #272

Merged
merged 1 commit into from
Jan 21, 2021
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
99 changes: 99 additions & 0 deletions concurrency/WFLY-12896_EE_Concurrency_Hung_Tasks_Termination.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
= EE Concurrency Hung Tasks Termination
:author: Eduardo Martins
:email: [email protected]
:toc: left
:icons: font
:idprefix:
:idseparator: -

== Overview

The managed executors in the EE subsystem are capable of identifying tasks which are running for a long unexpected time, also know as hung tasks, and this proposal specifies new functionality that will allows users to manually and automatically terminate such tasks.

== Issue Metadata

=== Issue

* https://issues.jboss.org/browse/WFLY-12896[WFLY-12896]

=== Related Issues

* https://issues.jboss.org/browse/EAP7-1397[EAP7-1397]

=== Dev Contacts

* mailto:{email}[{author}]

=== QE Contacts

emmartins marked this conversation as resolved.
Show resolved Hide resolved
* mailto:[email protected][Tommaso Borgato]

=== Testing By
// Put an x in the relevant field to indicate if testing will be done by Engineering or QE.
// Discuss with QE during the Kickoff state to decide this
[x] Engineering

[ ] QE

=== Affected Projects or Components

* WildFly

=== Other Interested Projects

* NONE

== Requirements

=== Hard Requirements

* Add the following attribute to the https://wildscribe.github.io/WildFly/18.0/subsystem/ee/managed-executor-service/[/subsystem=ee/managed-executor-service resource]:
** *hung-task-termination-period*: the period, in milliseconds, for hung tasks automatic termination. A value of 0, which is the default, deactivates the feature.

CLI to read the attribute from the Managed Executor Service resource named *default*:
----
/subsystem=ee/managed-executor-service=default:read-attribute(name=hung-task-termination-period)
emmartins marked this conversation as resolved.
Show resolved Hide resolved
----

* Add the following operation to the https://wildscribe.github.io/WildFly/18.0/subsystem/ee/managed-executor-service/[/subsystem=ee/managed-executor-service resource]:
** *terminate-hung-tasks*: manually terminates all executor tasks that are hung.

CLI to execute the operation from the Managed Executor Service resource named *default*:
----
/subsystem=ee/managed-executor-service=default:terminate-hung-tasks()
emmartins marked this conversation as resolved.
Show resolved Hide resolved
----

* Add the following attribute to the https://wildscribe.github.io/WildFly/18.0/subsystem/ee/managed-scheduled-executor-service/[/subsystem=ee/managed-scheduled-executor-service resource]:
** *hung-task-termination-period*: the period, in milliseconds, for hung tasks automatic termination. A value of 0, which is the default, deactivates the feature.

CLI to read the attribute from the Managed Scheduled Executor Service resource named *default*:
----
/subsystem=ee/managed-scheduled-executor-service=default:read-attribute(name=hung-task-termination-period)
----

* Add the following operation to the https://wildscribe.github.io/WildFly/18.0/subsystem/ee/managed-scheduled-executor-service/[/subsystem=ee/managed-scheduled-executor-service resource]:
** *terminate-hung-tasks()*: manually terminates all executor tasks that are hung.

CLI to execute the operation from the Managed Scheduled Executor Service resource named *default*:
----
/subsystem=ee/managed-scheduled-executor-service=default:terminate-hung-tasks()
emmartins marked this conversation as resolved.
Show resolved Hide resolved
----

=== Nice-to-Have Requirements

* NONE

=== Non-Requirements

* Domain mode:
** the new attribute discussed in this proposal will be provided on the servers in a managed domain, and registered with the /profile=*/subsystem=ee resources, being automatically discarded for servers which do not support it.
emmartins marked this conversation as resolved.
Show resolved Hide resolved
** the new operation discussed in this proposal will be provided on the servers in a managed domain, and registered only with the /host=*/server=*/subsystem=ee resources.
emmartins marked this conversation as resolved.
Show resolved Hide resolved

== Test Plan

* Changes in Wildfly management model will be covered in WFLY testsuite.
* Checking the new featured functionality work as expected will be covered in WFLY testsuite.

== Community Documentation

* Covered by local descriptions in management model.