Fixed a bug where timers wouldn't expire after `process:reinitialize`.

Pending `ticks` are used by `scheduleTick` to decide whether to schedule
an event loop tick when a new timer is scheduled - since we only need to
schedule the event loop tick if the new timer is supposed to expire
earlier than the current earliest timer.
Unfortunately `Clock::finalize` didn't clear `ticks`, which means that
the following could happen:
- schedule a timer T0 for expiration at time t0
- call `process::reinitalize`, which calls `Clock::finalize` but doesn't
  clear `ticks`
- schedule a new timer T1 for expiration at time t1 > t0: since
  `scheduleTick` would see that there was already the earlier pending
  tick for T0 in `ticks` with t0 < t1, it wouldn't actually schedule a
  tick of the event loop

Therefore new timers would never fire again.

This caused e.g.
`DockerContainerizerIPv6Test.ROOT_DOCKER_LaunchIPv6HostNetwork` test to
hang since it called `process::reinitialized` while having some active
timers - e.g. the reaper periodic timer.

Also added a test specifically for this bug.
2 files changed
tree: 0022340c750e403d8372b107c0c4df4c9e62d327
  1. 3rdparty/
  2. bin/
  3. cmake/
  4. docs/
  5. include/
  6. m4/
  7. site/
  8. src/
  9. support/
  10. .gitattributes
  11. bootstrap
  12. CHANGELOG
  13. CMakeLists.txt
  14. configure.ac
  15. Doxyfile
  16. LICENSE
  17. Makefile.am
  18. mesos.pc.in
  19. NOTICE
  20. README.md
README.md

Apache Mesos

Apache Mesos is a cluster manager that provides efficient resource isolation and sharing across distributed applications, or frameworks. It can run Hadoop, Jenkins, Spark, Aurora, and other frameworks on a dynamically shared pool of nodes.

Visit us at mesos.apache.org.

Mailing Lists

Documentation

Documentation is available in the docs/ directory. Additionally, a rendered HTML version can be found on the Mesos website's Documentation page.

Installation

Instructions are included on the Getting Started page.

License

Apache Mesos is licensed under the Apache License, Version 2.0.

For additional information, see the LICENSE and NOTICE files.