{"push_id":1418474015,"size":1,"distinct_size":1,"ref":"refs/heads/wip-17762","head":"bed475032ba94d7a4e9c0fa0540985ba244bd1f9","before":"2b73f41d02e236480a988c1290b5bc87f3ef5550","commits":[{"sha":"bed475032ba94d7a4e9c0fa0540985ba244bd1f9","author":{"name":"Kefu Chai","email":"b1a573d2d314b4071b008c785c81b68303acbb72@redhat.com"},"message":"common,test: g_ceph_context->put() upon return\n\nprior to this change, global_init() could create a new CephContext\nand assign it to g_ceph_context. it's our responsibilty to release\nthe CephContext explicitly using cct->put() before the application\nquits. but sometimes, we fail to do so.\n\nin this change, global_init() will return an intrusive_ptr<CephContext>,\nwhich calls `g_ceph_context->put()` in its dtor. this ensures that\nthe CephContext is always destroyed before main() returns. so the\nlog is flushed before _log_exp_length is destroyed.\n\nthere are two cases where global_pre_init() is called directly.\n- ceph_conf.cc: g_ceph_context->put() will be called by an intrusive_ptr<>\n  deleter.\n- rgw_main.cc: global_init() is called later on on the success code\n  path, so it will be taken care of.\n\nFixes: http://tracker.ceph.com/issues/17762\nSigned-off-by: Kefu Chai <kchai@redhat.com>","distinct":true,"url":"https://api.github.com/repos/tchaikov/ceph/commits/bed475032ba94d7a4e9c0fa0540985ba244bd1f9"}]}
{"actor":{"display_login":"tchaikov"}}