]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: use monotonic waits in Beacon 24375/head
authorPatrick Donnelly <pdonnell@redhat.com>
Fri, 17 Aug 2018 22:03:56 +0000 (15:03 -0700)
committerNathan Cutler <ncutler@suse.com>
Wed, 3 Oct 2018 19:06:02 +0000 (21:06 +0200)
commit1e753e590af8b7b7cd73c47917621f8ebcf70021
tree0c55813b57b091ef8b2d1f6d603cde1c31faa226
parentf394dfbf4d6e2bb306ee24d8929510e721ea9825
mds: use monotonic waits in Beacon

This guarantees that the sender thread cannot be disrupted by system clock
changes. This commit also simplifies the sender thread by manually managing the
thread and avoiding unnecessary context creation.

Fixes: http://tracker.ceph.com/issues/26962
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit a5fc29b95281c6ca58c9177c665c379846beb4b3)

Conflicts:
src/mds/Beacon.cc
- g_conf->foo instead of g_conf()->foo
- boost::string_view instead of std::string_view
- always specify template type std::unique_lock<std::mutex>
src/mds/Beacon.h
- time::min() instead of clock::zero()
- always specify template type std::unique_lock<std::mutex>
- std::chrono::seconds instead of "1s" in std::chrono_literals namespace
  (which is a C++14ism)
src/mds/Beacon.cc
src/mds/Beacon.h