Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: change task and peer ttl #984

Merged
merged 1 commit into from
Jan 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/config/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const (
ServerPortLowerLimit = 15000
ServerPortUpperLimit = 65000

DefaultTaskExpireTime = 3 * time.Minute
DefaultTaskExpireTime = 6 * time.Hour
DefaultGCInterval = 1 * time.Minute
DefaultDaemonAliveTime = 5 * time.Minute
DefaultScheduleTimeout = 5 * time.Minute
Expand Down
2 changes: 1 addition & 1 deletion docs/en/deployment/configuration/dfget.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ upload:
storage:
# task data expire time
# when there is no access to a task data, this task will be gc.
taskExpireTime: 3m0s
taskExpireTime: 6h
# storage strategy when process task data
# io.d7y.storage.v2.simple : download file to data directory first, then copy to output path, this is default action
# the download file in date directory will be the peer data for uploading to other peers
Expand Down
8 changes: 4 additions & 4 deletions docs/en/deployment/configuration/scheduler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ scheduler:
# gc metadata configuration
gc:
# peerGCInterval peer's gc interval
peerGCInterval: 1m
peerGCInterval: 10m
# peerTTL peer's TTL duration
peerTTL: 5m
peerTTL: 24h
# taskGCInterval task's gc interval
taskGCInterval: 1m
taskGCInterval: 10m
# taskTTL task's TTL duration
taskTTL: 10m
taskTTL: 24h

# dynamic data configuration
dynConfig:
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/deployment/configuration/dfget.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ upload:
storage:
# task data 过期时间
# 超过指定时间没有访问之后,缓存数据将会被清理
taskExpireTime: 3m0s
taskExpireTime: 6h
# storage strategy when process task data
# io.d7y.storage.v2.simple : download file to data directory first, then copy to output path, this is default action
# the download file in date directory will be the peer data for uploading to other peers
Expand Down
8 changes: 4 additions & 4 deletions docs/zh-CN/deployment/configuration/scheduler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ scheduler:
# 数据回收策略
gc:
# peer 的回收间隔
peerGCInterval: 1m
peerGCInterval: 10m
# 不活跃的 peer 的存活时间
peerTTL: 5m
peerTTL: 24h
# task 的回收间隔
taskGCInterval: 1m
taskGCInterval: 10m
# 不活跃的 task 的存活时间
taskTTL: 10m
taskTTL: 24h

# 动态数据配置
dynConfig:
Expand Down
8 changes: 4 additions & 4 deletions scheduler/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ func New() *Config {
RetryLimit: 10,
RetryInterval: 1 * time.Second,
GC: &GCConfig{
PeerGCInterval: 1 * time.Minute,
PeerTTL: 5 * time.Minute,
TaskGCInterval: 1 * time.Minute,
TaskTTL: 10 * time.Minute,
PeerGCInterval: 10 * time.Minute,
PeerTTL: 24 * time.Hour,
TaskGCInterval: 10 * time.Minute,
TaskTTL: 24 * time.Hour,
},
},
DynConfig: &DynConfig{
Expand Down