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

remove stack log when restore snapshot #16070

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

kkkkun
Copy link
Contributor

@kkkkun kkkkun commented Jun 13, 2023

before

./bin/etcdutl snapshot restore a.snap --data-dir=./a-cluster
2023-06-13T16:09:36+08:00       info    snapshot/v3_snapshot.go:248     restoring snapshot      {"path": "a.snap", "wal-dir": "a-cluster/member/wal", "data-dir": "./a-cluster", "snap-dir": "a-cluster/member/snap", "stack": "go.etcd.io/etcd/etcdutl/v3/snapshot.(*v3Manager).Restore\n\tgo.etcd.io/etcd/etcdutl/v3/snapshot/v3_snapshot.go:254\ngo.etcd.io/etcd/etcdutl/v3/etcdutl.SnapshotRestoreCommandFunc\n\tgo.etcd.io/etcd/etcdutl/v3/etcdutl/snapshot_command.go:147\ngo.etcd.io/etcd/etcdutl/v3/etcdutl.snapshotRestoreCommandFunc\n\tgo.etcd.io/etcd/etcdutl/v3/etcdutl/snapshot_command.go:117\ngithub.com/spf13/cobra.(*Command).execute\n\tgithub.com/spf13/cobra@v1.1.3/command.go:856\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\tgithub.com/spf13/cobra@v1.1.3/command.go:960\ngithub.com/spf13/cobra.(*Command).Execute\n\tgithub.com/spf13/cobra@v1.1.3/command.go:897\nmain.Start\n\tgo.etcd.io/etcd/etcdutl/v3/ctl.go:50\nmain.main\n\tgo.etcd.io/etcd/etcdutl/v3/main.go:23\nruntime.main\n\truntime/proc.go:250"}
2023-06-13T16:09:36+08:00       info    membership/store.go:141 Trimming membership information from the backend...
2023-06-13T16:09:36+08:00       info    membership/cluster.go:421       added member    {"cluster-id": "cdf818194e3a8c32", "local-member-id": "0", "added-peer-id": "8e9e05c52164694d", "added-peer-peer-urls": ["http://localhost:2380"]}
2023-06-13T16:09:36+08:00       info    snapshot/v3_snapshot.go:269     restored snapshot       {"path": "a.snap", "wal-dir": "a-cluster/member/wal", "data-dir": "./a-cluster", "snap-dir": "a-cluster/member/snap"}

after

./bin/etcdutl snapshot restore a.snap --data-dir=./a-cluster
2023-06-13T16:45:18+08:00       info    snapshot/v3_snapshot.go:248     restoring snapshot      {"path": "a.snap", "wal-dir": "a-cluster/member/wal", "data-dir": "./a-cluster", "snap-dir": "a-cluster/member/snap"}
2023-06-13T16:45:18+08:00       info    membership/store.go:141 Trimming membership information from the backend...
2023-06-13T16:45:18+08:00       info    membership/cluster.go:421       added member    {"cluster-id": "cdf818194e3a8c32", "local-member-id": "0", "added-peer-id": "8e9e05c52164694d", "added-peer-peer-urls": ["http://localhost:2380"]}
2023-06-13T16:45:18+08:00       info    snapshot/v3_snapshot.go:268     restored snapshot       {"path": "a.snap", "wal-dir": "a-cluster/member/wal", "data-dir": "./a-cluster", "snap-dir": "a-cluster/member/snap"}

Signed-off-by: kkkkun <scuzk373x@gmail.com>
Copy link
Member

@chaochn47 chaochn47 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s.lg.Info(
"restoring snapshot",
zap.String("path", s.srcDbPath),
zap.String("wal-dir", s.walDir),
zap.String("data-dir", dataDir),
zap.String("snap-dir", s.snapDir),
)

It is consistent with main branch.

LGTM, thanks @kkkkun!

Copy link
Member

@jmhbnz jmhbnz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - Note this is technically a backport of 8800f0c / #13767

Once this merges given it touches log output (albeit very minor) should we add a line to next 3.5 release CHANGELOG?

@kkkkun
Copy link
Contributor Author

kkkkun commented Jun 16, 2023

LGTM - Note this is technically a backport of 8800f0c / #13767

Once this merges given it touches log output (albeit very minor) should we add a line to next 3.5 release CHANGELOG?

Ho,I forget I ever commit #13767 fixed in master. But when i restore etcd used etcd:v3.5.7, it's still confused.

@jmhbnz jmhbnz requested a review from serathius July 23, 2023 09:28
@jmhbnz jmhbnz mentioned this pull request Oct 17, 2023
@serathius serathius merged commit 4cf9ef8 into etcd-io:release-3.5 Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants