if cls_log_trim() returns 0, it may have stopped after 1000 entries
before trimming all the way to to_marker. only update last_trim on
ENODATA, so we continue trimming until done
Fixes: http://tracker.ceph.com/issues/38075
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit
f25e85696c40d19e02c2cdeab4148c5751966068)
Conflicts:
src/rgw/rgw_cr_rados.cc : Resolved for compat.h
+#include "include/compat.h"
#include "rgw_rados.h"
#include "rgw_coroutine.h"
#include "rgw_cr_rados.h"
int RGWSyncLogTrimCR::request_complete()
{
int r = RGWRadosTimelogTrimCR::request_complete();
- if (r < 0 && r != -ENODATA) {
+ if (r != -ENODATA) {
return r;
}
+ // nothing left to trim, update last_trim_marker
if (*last_trim_marker < to_marker) {
*last_trim_marker = to_marker;
}