mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Klues" <>
Subject Review Request 42154: Moved push_back to end of removeFramework.
Date Mon, 11 Jan 2016 21:41:07 GMT

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

Review request for mesos and Ben Mahler.

Repository: mesos


Previously, the framework being removed was pushed back to the circular
buffer of completed frameworks as a shared_ptr halfway through the
computation done to remove a framework from the master. The pointer to
the framework was then accessed again after this point.

Pushing a shared_ptr this way is fine so long as the push_pack succeeds
and the pointer is actually inserted into the buffer. However, with the
introduction of the new flags to set the size of this buffer via
max_completed_frameworks, it's possible for the size of this buffer to
be 0. As such, the circular buffer was taking control of the pointer,
noticing there was nowhere to push it, and then freeing it.  This causes
problems since the pointer is then accessed later on.

This patch moves the insertion of the shared pointer into the circular
buffer to the end of the removeFramework() call. This change should not
have any adverse effects.



  src/master/master.cpp 2d9b7f9540574aa3ef9e5af3b2b8922dffeebac8 




Kevin Klues

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