]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: store oldest mdlog period in rados 10558/head
authorCasey Bodley <cbodley@redhat.com>
Tue, 2 Aug 2016 18:09:13 +0000 (14:09 -0400)
committerCasey Bodley <cbodley@redhat.com>
Fri, 23 Sep 2016 15:17:24 +0000 (11:17 -0400)
commitd32654b7cd60ccc4e23d3f05b9e4385a697bacd6
tree46caaeb53a7c2cf341af76987bcbaf22a13d15c2
parent7f228e97bd51ed8eab85ad32c47964ebd76d15f5
rgw: store oldest mdlog period in rados

RGWMetadataManager no longer makes stat calls on logs shards to
determine its oldest_log_period. Instead, it records the oldest log's
period id and realm_epoch in a rados object. If
RGWMetadataManager::init_oldest_log_period() finds no such object, it
calls find_oldest_period() to read period predecessors until it reaches
the realm's first period, and writes that to rados.

RGWMetadataManager::init_oldest_log_period() is now only called from
RGWRados::init_complete() if run_sync_threads is true, instead of
running unconditionally in RGWMetadataManager::init(), which allows us
to skip building up a period history for radosgw-admin.

Now that RGWMetadataManager::read_oldest_log_period() can return ENOENT
for an uninitialized mdlog history, RGWRemoteMetaLog::run_sync() will
retry on ENOENT as well.

Fixes: http://tracker.ceph.com/issues/16894
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_metadata.cc
src/rgw/rgw_metadata.h
src/rgw/rgw_rados.cc
src/rgw/rgw_rest_log.cc
src/rgw/rgw_sync.cc
src/rgw/rgw_tools.cc
src/rgw/rgw_tools.h