Skip to content

Commit

Permalink
feat: add iperf3 for Dockerfile and change is_expired for PersistentC…
Browse files Browse the repository at this point in the history
…acheTask (#975)

Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi authored Feb 11, 2025
1 parent a33f861 commit d56dae3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ RUN go install github.com/google/pprof@latest

FROM debian:bookworm-slim

RUN apt-get update && apt-get install -y --no-install-recommends wget curl \
RUN apt-get update && apt-get install -y --no-install-recommends iperf3 wget curl \
bash-completion procps apache2-utils ca-certificates binutils bpfcc-tools \
dnsutils iputils-ping vim linux-perf llvm graphviz \
&& rm -rf /var/lib/apt/lists/*
Expand Down
5 changes: 1 addition & 4 deletions dragonfly-client-storage/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,7 @@ impl PersistentCacheTask {

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

/// is_failed returns whether the persistent cache task downloads failed.
Expand Down

0 comments on commit d56dae3

Please sign in to comment.