You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Alexander Rukletsov (JIRA)" <ji...@apache.org> on 2018/10/04 09:02:00 UTC
[jira] [Comment Edited] (MESOS-9274) v1 JAVA scheduler library can
drop TEARDOWN upon destruction.
[ https://issues.apache.org/jira/browse/MESOS-9274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16630527#comment-16630527 ]
Alexander Rukletsov edited comment on MESOS-9274 at 10/4/18 9:01 AM:
---------------------------------------------------------------------
I see several possible solutions here:
* Ensure the JAVA scheduler library is not destructed after {{TEARDOWN}} is sent. This is out of our control hence does not seem like a good solution or user experience
* Add {{sleep(5)}} in [{{V1Mesos::finalize()}}|https://github.com/apache/mesos/blob/270c4cb62f5680bcf952bfb7ec8dfc10843f21e0/src/java/jni/org_apache_mesos_v1_scheduler_V1Mesos.cpp#L258]. This is a hacky solution but it [_follows the pattern_|https://github.com/apache/mesos/blob/86653356d763fee79e9467cf7b07bebb449e8aff/src/launcher/default_executor.cpp#L1082] ;).
* Use {{Mesos::call()}} instead of {{Mesos::send()}} and wait for the response in {{v1Mesos::send()}}. This seems like the cleanest solution.
was (Author: alexr):
I see several possible solutions here:
* Ensure the JAVA scheduler library is not destructed after {{TEARDOWN}} is sent. This is out of our control hence does not seem like a good solution or user experience
* Add {{sleep(5)}} in [{{V1Mesos::finalize()}}|https://github.com/apache/mesos/blob/270c4cb62f5680bcf952bfb7ec8dfc10843f21e0/src/java/jni/org_apache_mesos_v1_scheduler_V1Mesos.cpp#L258]. This is a hacky solution but it [_follows the pattern_|https://github.com/apache/mesos/blob/86653356d763fee79e9467cf7b07bebb449e8aff/src/launcher/default_executor.cpp#L1082] ;).
* Use {[Mesos::call()}} instead of {{Mesos::send()}} and wait for the response in {{v1Mesos::send()}}. This seems like the cleanest solution.
> v1 JAVA scheduler library can drop TEARDOWN upon destruction.
> -------------------------------------------------------------
>
> Key: MESOS-9274
> URL: https://issues.apache.org/jira/browse/MESOS-9274
> Project: Mesos
> Issue Type: Bug
> Components: java api, scheduler driver
> Reporter: Alexander Rukletsov
> Assignee: Alexander Rukletsov
> Priority: Major
> Labels: api, mesosphere, scheduler
>
> Currently the v1 JAVA scheduler library neither ensures {{Call}} s are sent to the master nor waits for responses. This can be problematic if the library is destroyed (or garbage collected) right after sending a {{TEARDOWN}} call: destruction of the underlying {{Mesos}} actor races with sending the call.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)