From 3ec1aeade0e6b0f8d0b084c0943d36b41032b497 Mon Sep 17 00:00:00 2001 From: zwang28 <84491488@qq.com> Date: Fri, 27 Sep 2024 11:34:36 +0800 Subject: [PATCH] fixup --- src/meta/src/hummock/manager/gc.rs | 8 ++++++-- src/meta/src/hummock/manager/timer_task.rs | 4 +++- src/object_store/src/object/s3.rs | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/meta/src/hummock/manager/gc.rs b/src/meta/src/hummock/manager/gc.rs index 9fb9a2bf96fc8..a548025781e17 100644 --- a/src/meta/src/hummock/manager/gc.rs +++ b/src/meta/src/hummock/manager/gc.rs @@ -188,9 +188,13 @@ impl HummockManager { sst_retention_time, Duration::from_secs(self.env.opts.min_sst_retention_time_sec), ); + let start_after = self.full_gc_state.next_start_after(); + let limit = self.full_gc_state.limit; tracing::info!( retention_sec = sst_retention_time.as_secs(), prefix = prefix.as_ref().unwrap_or(&String::from("")), + start_after, + limit, "run full GC" ); @@ -205,8 +209,8 @@ impl HummockManager { .send_event(ResponseEvent::FullScanTask(FullScanTask { sst_retention_time_sec: sst_retention_time.as_secs(), prefix, - start_after: self.full_gc_state.next_start_after(), - limit: self.full_gc_state.limit, + start_after, + limit, })) .map_err(|_| Error::CompactorUnreachable(compactor.context_id()))?; Ok(true) diff --git a/src/meta/src/hummock/manager/timer_task.rs b/src/meta/src/hummock/manager/timer_task.rs index f8fd51346f490..eb0b2655d0041 100644 --- a/src/meta/src/hummock/manager/timer_task.rs +++ b/src/meta/src/hummock/manager/timer_task.rs @@ -340,8 +340,10 @@ impl HummockManager { } HummockTimerEvent::FullGc => { + let retention_sec = + hummock_manager.env.opts.min_sst_retention_time_sec; if hummock_manager - .start_full_gc(Duration::from_secs(3600), None) + .start_full_gc(Duration::from_secs(retention_sec), None) .is_ok() { tracing::info!("Start full GC from meta node."); diff --git a/src/object_store/src/object/s3.rs b/src/object_store/src/object/s3.rs index 082fbd9f71cce..4dcc26df8723a 100644 --- a/src/object_store/src/object/s3.rs +++ b/src/object_store/src/object/s3.rs @@ -1014,6 +1014,7 @@ impl Stream for S3ObjectIter { .bucket(&self.bucket) .prefix(&self.prefix); if let Some(start_after) = self.start_after.as_ref() { + #[cfg(not(madsim))] request = request.start_after(start_after); } if let Some(continuation_token) = self.next_continuation_token.as_ref() {