-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40811/
-----------------------------------------------------------

Review request for mesos and Ben Mahler.


Bugs: MESOS-4029
    https://issues.apache.org/jira/browse/MESOS-4029


Repository: mesos


Description
-------

Previously, the `event` queue object was defined after the `callbacks` object. 
However, the `callbacks` object held on a reference to the queue object. This 
led to a crash in some scenarios when we received another event from the master 
after the `event` object was destroyed. (Note that objects on the stack are 
destroyed in the reverse order of definition)

The short term fix is to move the `event` queue object above the `callbacks` 
object. This ensures that it is destroyed after the `callbacks` object. The 
long term fix would be worked on via `MESOS-3339` that moves the tests to a 
callback interface model similar to what we have for the driver tests.


Diffs
-----

  src/tests/master_maintenance_tests.cpp 
ade05f932020013ced19c1573be756a029396fac 
  src/tests/scheduler_tests.cpp 67432109c7df6be0aa76e94a03bd5b2e9c96d14e 

Diff: https://reviews.apache.org/r/40811/diff/


Testing
-------

make check + Reproduced this by introducing a sleep in the `Mesos` destructor + 
did not filter out the `HEARTBEAT` event.


Thanks,

Anand Mazumdar

Reply via email to