Skip to content

Commit 3a19418

Browse files
authored
Merge pull request #572 from phantom5099/file-checkpoint
pref(checkpoint):修复 Checkpoint 恢复与 Run 级 Diff 完整性
2 parents 9b7b8a3 + df23932 commit 3a19418

11 files changed

Lines changed: 1195 additions & 87 deletions

internal/checkpoint/checkpoint_manager.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ type CreateCheckpointInput struct {
3737
type ListCheckpointOpts struct {
3838
Limit int
3939
RestorableOnly bool
40+
RunID string
4041
}
4142

4243
// RestoreCheckpointInput 描述一次 restore 操作的完整输入。
@@ -219,6 +220,10 @@ WHERE session_id = ?
219220
query += ` AND restorable = 1 AND status = ?`
220221
args = append(args, string(session.CheckpointStatusAvailable))
221222
}
223+
if opts.RunID != "" {
224+
query += ` AND run_id = ?`
225+
args = append(args, opts.RunID)
226+
}
222227
query += ` ORDER BY created_at_ms DESC`
223228
if opts.Limit > 0 {
224229
query += ` LIMIT ?`

0 commit comments

Comments
 (0)