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

Dominic Hamon commented on MESOS-1452:
--------------------------------------

1. Is much more explicit and clearer for a reader.

I would only go for 2. if there was the possibility of needing to combine the 
enum values as flags down the road. I don't think that's the case here, or at 
least I can't imagine an example where we'd want to do that, so I would go with 
1.

> Improve Master::removeOffer to avoid further resource accounting bugs.
> ----------------------------------------------------------------------
>
>                 Key: MESOS-1452
>                 URL: https://issues.apache.org/jira/browse/MESOS-1452
>             Project: Mesos
>          Issue Type: Improvement
>            Reporter: Benjamin Mahler
>            Assignee: Benjamin Mahler
>
> Per comments on this review: https://reviews.apache.org/r/21750/
> We've had numerous bugs around resource accounting in the master due to the 
> trickiness of removing offers in the Master code.
> There are a few ways to improve this:
> 1. Add multiple offer methods to differentiate semantics:
> {code}
> useOffer(offerId);
> rescindOffer(offerId);
> discardOffer(offerId);
> {code}
> 2. Add an enum to removeOffer to differentiate removal semantics:
> {code}
> removeOffer(offerId, USE);
> removeOffer(offerId, RESCIND);
> removeOffer(offerId, DISCARD);
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to