Skip to content

Commit

Permalink
feat: bump api from v2.1.23 to v2.1.25 and add ttl for StatPersistent…
Browse files Browse the repository at this point in the history
…CacheTask (#3830)

Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi authored Feb 12, 2025
1 parent d7a5eb8 commit dfa83b2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.23.0

require (
cloud.google.com/go/storage v1.50.0
d7y.io/api/v2 v2.1.23
d7y.io/api/v2 v2.1.25
github.com/MysteriousPotato/go-lockable v1.0.0
github.com/RichardKnop/machinery v1.10.8
github.com/Showmax/go-fqdn v1.0.0
Expand Down Expand Up @@ -152,7 +152,7 @@ require (
github.com/docker/go-metrics v0.0.1 // indirect
github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1 // indirect
github.com/envoyproxy/go-control-plane/envoy v1.32.3 // indirect
github.com/envoyproxy/protoc-gen-validate v1.1.0 // indirect
github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ cloud.google.com/go/storage v1.50.0 h1:3TbVkzTooBvnZsk7WaAQfOsNrdoM8QHusXA1cpk6Q
cloud.google.com/go/storage v1.50.0/go.mod h1:l7XeiD//vx5lfqE3RavfmU9yvk5Pp0Zhcv482poyafY=
cloud.google.com/go/trace v1.11.2 h1:4ZmaBdL8Ng/ajrgKqY5jfvzqMXbrDcBsUGXOT9aqTtI=
cloud.google.com/go/trace v1.11.2/go.mod h1:bn7OwXd4pd5rFuAnTrzBuoZ4ax2XQeG3qNgYmfCy0Io=
d7y.io/api/v2 v2.1.23 h1:adUXI1QHNxWG38iwtefZN3j7DysGkHIc3/UmOYFJBgw=
d7y.io/api/v2 v2.1.23/go.mod h1:zPZ7m8yC1LZH9VR4ACcvrphhPIVKSS2c3QHG+PRSixU=
d7y.io/api/v2 v2.1.25 h1:Y5CuOJqLc4FtiQRklpcPn7QJqyZkg9QuZKCqanGa1zc=
d7y.io/api/v2 v2.1.25/go.mod h1:RFsSiRgEBfMrSHlrZWbkJ3xil8fnbbGSj0UMwbUUC5I=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U=
Expand Down Expand Up @@ -508,8 +508,8 @@ github.com/envoyproxy/go-control-plane/envoy v1.32.3/go.mod h1:F6hWupPfh75TBXGKA
github.com/envoyproxy/go-control-plane/ratelimit v0.1.0 h1:/G9QYbddjL25KvtKTv3an9lx6VBE2cnb8wp1vEGNYGI=
github.com/envoyproxy/go-control-plane/ratelimit v0.1.0/go.mod h1:Wk+tMFAFbCXaJPzVVHnPgRKdUdwW/KdbRt94AzgRee4=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/envoyproxy/protoc-gen-validate v1.1.0 h1:tntQDh69XqOCOZsDz0lVJQez/2L6Uu2PdjCQwWCJ3bM=
github.com/envoyproxy/protoc-gen-validate v1.1.0/go.mod h1:sXRDRVmzEbkM7CVcM06s9shE/m23dg3wzjl0UWqJ2q4=
github.com/envoyproxy/protoc-gen-validate v1.2.1 h1:DEo3O99U8j4hBFwbJfrz9VtgcDfUKS7KJ7spH3d86P8=
github.com/envoyproxy/protoc-gen-validate v1.2.1/go.mod h1:d/C80l/jxXLdfEIhX1W2TmLfsJ31lvEjwamM4DxlWXU=
github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
Expand Down
5 changes: 5 additions & 0 deletions scheduler/service/service_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -1869,6 +1869,7 @@ func (v *V2) handleRegisterPersistentCachePeerRequest(ctx context.Context, strea
ContentLength: parent.Task.ContentLength,
PieceCount: parent.Task.TotalPieceCount,
State: parent.Task.FSM.Current(),
Ttl: durationpb.New(parent.Task.TTL),
CreatedAt: timestamppb.New(parent.Task.CreatedAt),
UpdatedAt: timestamppb.New(parent.Task.UpdatedAt),
},
Expand Down Expand Up @@ -2063,6 +2064,7 @@ func (v *V2) handleReschedulePersistentCachePeerRequest(ctx context.Context, str
ContentLength: parent.Task.ContentLength,
PieceCount: parent.Task.TotalPieceCount,
State: parent.Task.FSM.Current(),
Ttl: durationpb.New(parent.Task.TTL),
CreatedAt: timestamppb.New(parent.Task.CreatedAt),
UpdatedAt: timestamppb.New(parent.Task.UpdatedAt),
},
Expand Down Expand Up @@ -2324,6 +2326,7 @@ func (v *V2) StatPersistentCachePeer(ctx context.Context, req *schedulerv2.StatP
ContentLength: peer.Task.ContentLength,
PieceCount: uint32(peer.Task.TotalPieceCount),
State: peer.Task.FSM.Current(),
Ttl: durationpb.New(peer.Task.TTL),
CreatedAt: timestamppb.New(peer.Task.CreatedAt),
UpdatedAt: timestamppb.New(peer.Task.UpdatedAt),
},
Expand Down Expand Up @@ -2571,6 +2574,7 @@ func (v *V2) UploadPersistentCacheTaskFinished(ctx context.Context, req *schedul
ContentLength: peer.Task.ContentLength,
PieceCount: peer.Task.TotalPieceCount,
State: peer.Task.FSM.Current(),
Ttl: durationpb.New(peer.Task.TTL),
CreatedAt: timestamppb.New(peer.Task.CreatedAt),
UpdatedAt: timestamppb.New(peer.Task.UpdatedAt),
}
Expand Down Expand Up @@ -2770,6 +2774,7 @@ func (v *V2) StatPersistentCacheTask(ctx context.Context, req *schedulerv2.StatP
ContentLength: task.ContentLength,
PieceCount: task.TotalPieceCount,
State: task.FSM.Current(),
Ttl: durationpb.New(task.TTL),
CreatedAt: timestamppb.New(task.CreatedAt),
UpdatedAt: timestamppb.New(task.UpdatedAt),
}, nil
Expand Down

0 comments on commit dfa83b2

Please sign in to comment.