Conversation
Comment on lines
+395
to
396
| s := fmt.Sprintf("%s \"%s\", started at %s. Status: %s. Duration: %s. [op id: %s]", | ||
| c.Type, c.Name, time.Unix((c.StartTS), 0).UTC().Format("2006-01-02T15:04:05Z"), |
Contributor
There was a problem hiding this comment.
[gofmt] reported by reviewdog 🐶
Suggested change
| s := fmt.Sprintf("%s \"%s\", started at %s. Status: %s. Duration: %s. [op id: %s]", | |
| c.Type, c.Name, time.Unix((c.StartTS), 0).UTC().Format("2006-01-02T15:04:05Z"), | |
| s := fmt.Sprintf( | |
| "%s \"%s\", started at %s. Status: %s. Duration: %s. [op id: %s]", | |
| c.Type, c.Name, time.Unix(c.StartTS, 0).UTC().Format("2006-01-02T15:04:05Z"), |
| } | ||
|
|
||
| func SetBackupProgress(ctx context.Context, conn connect.Client, bcpName string, p progress.Progress) error { | ||
| _, err := conn.BcpCollection().UpdateOne(ctx, |
Contributor
There was a problem hiding this comment.
[gofmt] reported by reviewdog 🐶
Suggested change
| _, err := conn.BcpCollection().UpdateOne(ctx, | |
| _, err := conn.BcpCollection().UpdateOne( | |
| ctx, |
| } | ||
|
|
||
| func SetRSProgress(ctx context.Context, conn connect.Client, bcpName, rsName string, p progress.Progress) error { | ||
| _, err := conn.BcpCollection().UpdateOne(ctx, |
Contributor
There was a problem hiding this comment.
[gofmt] reported by reviewdog 🐶
Suggested change
| _, err := conn.BcpCollection().UpdateOne(ctx, | |
| _, err := conn.BcpCollection().UpdateOne( | |
| ctx, |
| if done && ns != archive.MetaFile { | ||
| reporter.AddItems(1) | ||
| } | ||
| }) |
Contributor
There was a problem hiding this comment.
[gofmt] reported by reviewdog 🐶
Suggested change
| }) | |
| }, | |
| ) |
| } | ||
|
|
||
| func SetRestoreProgress(ctx context.Context, m connect.Client, name string, p progress.Progress) error { | ||
| _, err := m.RestoresCollection().UpdateOne(ctx, |
Contributor
There was a problem hiding this comment.
[gofmt] reported by reviewdog 🐶
Suggested change
| _, err := m.RestoresCollection().UpdateOne(ctx, | |
| _, err := m.RestoresCollection().UpdateOne( | |
| ctx, |
| } | ||
|
|
||
| func SetRestoreRSProgress(ctx context.Context, m connect.Client, name, rsName string, p progress.Progress) error { | ||
| _, err := m.RestoresCollection().UpdateOne(ctx, |
Contributor
There was a problem hiding this comment.
[gofmt] reported by reviewdog 🐶
Suggested change
| _, err := m.RestoresCollection().UpdateOne(ctx, | |
| _, err := m.RestoresCollection().UpdateOne( | |
| ctx, |
Comment on lines
13
to
+14
| type UploadFunc func(ns, ext string, r io.Reader) error | ||
| type ProgressFunc func(ns string, bytes int64, done bool) |
Contributor
There was a problem hiding this comment.
[gofmt] reported by reviewdog 🐶
Suggested change
| type UploadFunc func(ns, ext string, r io.Reader) error | |
| type ProgressFunc func(ns string, bytes int64, done bool) | |
| type ( | |
| UploadFunc func(ns, ext string, r io.Reader) error | |
| ProgressFunc func(ns string, bytes int64, done bool) | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduces enhanced tracking and reporting of backup and restore operation durations and progress throughout the Percona Backup for MongoDB CLI and core logic. It adds duration and progress fields to backup and restore metadata, displays this information in CLI outputs, and implements more granular progress reporting for logical backups. The changes aim to provide better visibility into operation status for users and improve logging for troubleshooting.
User-visible improvements:
cmd/pbm/backup.go,cmd/pbm/restore.go) now include operation duration (in seconds and human-readable format) and, for terminal states, a finish timestamp. [1] [2] [3] [4]pbm statuscommand output now shows operation durations and progress for running backup and restore operations, and includes a duration column in the snapshot listing. [1] [2] [3] [4] [5] [6] [7]Progress reporting enhancements:
progress.Reporterand passing progress updates to the coordinator. [1] [2] [3] [4] [5]Codebase and logging improvements:
Metadata and API changes:
Dependency updates:
progresspackage is now imported and used in all relevant commands and backup/restore implementations. [1] [2] [3] [4] [5] [6]