]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon: fork early to avoid leveldb static env state
authorSage Weil <sage@inktank.com>
Fri, 3 May 2013 18:29:24 +0000 (11:29 -0700)
committerSage Weil <sage@inktank.com>
Fri, 3 May 2013 18:29:24 +0000 (11:29 -0700)
commit2e0dd5ae6c8751e33d456b2b06c1204b63db959a
tree061f4c87b90d502bdea7cf0d73a8961fa69e386b
parent4f49565b409c9459862b12b012e41b0f7abb698b
mon: fork early to avoid leveldb static env state

leveldb has static state that prevents it from recreating its worker thread
after our fork(), even when we close and reopen the database (tsk tsk!).
Avoid this by forking early, before we touch leveldb.

Hide the details in a Preforker class.  This is modeled after what
ceph-fuse already does; we should convert it later.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
src/Makefile.am
src/ceph_mon.cc
src/common/Preforker.h [new file with mode: 0644]
src/global/global_init.cc
src/global/global_init.h