mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chun-Hung Hsiao <>
Subject Re: Review Request 70132: Do not implicitly decline speculatively converted resources.
Date Wed, 01 May 2019 20:35:20 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated May 1, 2019, 8:35 p.m.)

Review request for mesos, Benjamin Bannier, Benjamin Mahler, and Meng Zhu.


Addressed BenM's comments.

Bugs: MESOS-9616

Repository: mesos

Description (updated)

Currently if a framework accepts an offer with a `RESERVE` operation
without a task consuming the reserved resources, the resources will be
implicitly declined. This is counter to what one would expect (that only
the remaining resources in the offer will be declined):

  Offer `cpus:10` -> `ACCEPT` with `RESERVE cpus(role):1`
                     *Actual* implicit decline: `cpus:9;cpus(role):1`
                     *Expected* implicit decline: `cpus:9`

The same issue is present with other transformational operations (i.e.,

This patch fixes this issue by only implicitly declining the "remaining"
untransformed resources, computed as follows:

  Offered = `cpus:10`
  Remaining = `cpus:9;cpus(role):1`
  Implicitly declined = remaining - (remaining - offered)
                      = `cpus:9;cpus(role):1` - `cpus:(role):1`
                      = `cpus:9`

Diffs (updated)

  src/master/master.cpp ad54ae217863a08f4e6d743b39c176b171353084 
  src/tests/slave_tests.cpp b1c3a01031b917fb9773c8c890a8f88838870559 




make check

More testing done in r/70537.


Chun-Hung Hsiao

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message