rgw: when a period lookup for oldest_realm_epoch returns an ENOENT,
find the oldest one and update RGWMetadataLogHistory. This is to avoid an
empty cursor being passed in to ceph_assert() in PurgePeriodLogsCR::operate()
in case of incomplete period history.
Fixes: https://tracker.ceph.com/issues/40341
Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
(cherry picked from commit
0ea65d81d4d5431ca22340149dbd714e395ecdc3)
Conflicts:
src/rgw/services/svc_mdlog.cc
- file does not exist in mimic; made the changes manually to
src/rgw/rgw_metadata.cc
- in mimic, find_oldest_period takes an argument: store
- in mimic, write_history takes an additional argument: store