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

Till Toenshoff commented on MESOS-2309:
---------------------------------------

Seems this equality issue is rooted in the fact that protobuf's optional 
default values let "has_...." fail when the default is used instead of an 
explicit set value.

>From https://code.google.com/p/protobuf-c/wiki/Default_Values

{quote}
h4. Default-Values for Optional Fields

Once again, the value is used for initializing a fresh instance, and it can be 
seen if you deserialize a message missing an optional field.

Except for string and messages, all optional fields have a corresponding 
has_field member of the generated C struct. In the case of being set to a 
default value, the has_field member will NOT be set, but the "field" member 
itself will be set to the default value. Such values will only be serialized if 
the has_field flag is set.
{quote}

> Mesos rejects ExecutorInfo as incompatible when there is no functional 
> difference
> ---------------------------------------------------------------------------------
>
>                 Key: MESOS-2309
>                 URL: https://issues.apache.org/jira/browse/MESOS-2309
>             Project: Mesos
>          Issue Type: Bug
>            Reporter: Zameer Manji
>            Assignee: Joerg Schad
>            Priority: Minor
>
> In AURORA-1076 it was discovered that if an ExecutorInfo was changed such 
> that a previously unset optional field with a default value was changed to 
> have the field set with the default value, it would be rejected as not 
> compatible.
> For example if we have an ExecutorInfo with a CommandInfo with the {{shell}} 
> attribute unset and then we change the CommandInfo to set the {{shell}} 
> attribute to true Mesos will reject the task with:
> {noformat}
> I0130 21:50:05.373389 50869 master.cpp:3441] Sending status update TASK_LOST 
> (UUID: 82ef615c-0d59-4427-95d5-80cf0e52b3fc) for task 
> system-gc-c89c0c05-200c-462e-958a-ecd7b9a76831 of framework 
> 201103282247-0000000019-0000 'Task has invalid ExecutorInfo (existing 
> ExecutorInfo with same ExecutorID is not compatible).
> {noformat}
> This is not intuitive because the default value of the {{shell}} attribute is 
> true. There should be no difference between not setting an optional field 
> with a default value and setting that field to the default value.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to