Skip to content

Commit d56dae3

Browse files
authored
feat: add iperf3 for Dockerfile and change is_expired for PersistentCacheTask (#975)
Signed-off-by: Gaius <[email protected]>
1 parent a33f861 commit d56dae3

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

ci/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ RUN go install github.com/google/pprof@latest
5454

5555
FROM debian:bookworm-slim
5656

57-
RUN apt-get update && apt-get install -y --no-install-recommends wget curl \
57+
RUN apt-get update && apt-get install -y --no-install-recommends iperf3 wget curl \
5858
bash-completion procps apache2-utils ca-certificates binutils bpfcc-tools \
5959
dnsutils iputils-ping vim linux-perf llvm graphviz \
6060
&& rm -rf /var/lib/apt/lists/*

dragonfly-client-storage/src/metadata.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,7 @@ impl PersistentCacheTask {
185185

186186
/// is_expired returns whether the persistent cache task is expired.
187187
pub fn is_expired(&self) -> bool {
188-
// When scheduler runs garbage collection, it will trigger dfdaemon to evict the persistent cache task.
189-
// But sometimes the dfdaemon may not evict the persistent cache task in time, so we select the ttl * 1.2
190-
// as the expired time to force evict the persistent cache task.
191-
self.created_at + self.ttl * 2 < Utc::now().naive_utc()
188+
self.created_at + self.ttl < Utc::now().naive_utc()
192189
}
193190

194191
/// is_failed returns whether the persistent cache task downloads failed.

0 commit comments

Comments
 (0)