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

Meng Zhu commented on MESOS-1452:
---------------------------------

{noformat}
commit a8050cafaa5465bd74a2ced1c37bb6b64c735445
Author: Andrei Sekretenko <asekrete...@mesosphere.io>
Date:   Fri Sep 6 14:15:28 2019 -0700

    Separated handling offer validation failure from handling success.

    This patch refactors the loop through offer IDs in `Master::accept()`
    into two simpler loops: one loop for the offer validation failure case,
    another for the case of validation success, thus bringing removal of
    offers and recovering their resources close together.

    This is a prerequisite for implementing `rescindOffer()`/
    `declineOffer()` in the dependent patch.

    Review: https://reviews.apache.org/r/71433/

commit 7eb21c41ed255184988298e29644bf7f310c3374
Author: Andrei Sekretenko <asekrete...@mesosphere.io>
Date:   Fri Sep 6 14:15:38 2019 -0700

    Moved `removeOffers()` from `Master::accept()` into `Master::_accept()`.

    This patch moves offer removal on accept into the deferred continuation
    that follows authorization (if offers pass validation in `accept()`).

    Incrementing the `offers_accepted` metric is also moved to `_accept()`.

    This is a prerequisite for implementing `rescindOffer()` /
    `declineOffer()` / in the dependent patch.

    Review: https://reviews.apache.org/r/71434/

Author: Andrei Sekretenko <asekrete...@mesosphere.io>
Date:   Fri Sep 6 14:15:54 2019 -0700

    Replaced removeOffer + recoverResources pairs with specialized helpers.

    This patch adds helper methods `Master::rescindOffer()` /
    `Master::discardOffer()` that recover offer's resources in the allocator
    and remove the offer, and replaces paired calls of `removeOffer()` +
    `allocator->recoverResources()` with these helpers.

    Review: https://reviews.apache.org/r/71436/
{noformat}


> 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
>            Priority: Major
>
> 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
(v8.3.2#803003)

Reply via email to