Skip to content

get wrong parents bucket in withSnapshotBucket#1864

Merged
crosbymichael merged 1 commit intocontainerd:masterfrom
yanxuean:withSnapshotBucket
Dec 4, 2017
Merged

get wrong parents bucket in withSnapshotBucket#1864
crosbymichael merged 1 commit intocontainerd:masterfrom
yanxuean:withSnapshotBucket

Conversation

@yanxuean
Copy link
Copy Markdown
Member

@yanxuean yanxuean commented Dec 2, 2017

Signed-off-by: yason [email protected]

  1. fix a small bug. But it don't affect us, because we don't use it.
  2. improve error message for CommitActive
  3. slove comment snapshots/overlay: cleanup rollback code for overlay.prepare #1854 (comment)

Closes #1851

@codecov-io
Copy link
Copy Markdown

codecov-io commented Dec 2, 2017

Codecov Report

Merging #1864 into master will not change coverage.
The diff coverage is 61.53%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1864   +/-   ##
=======================================
  Coverage   49.18%   49.18%           
=======================================
  Files          86       86           
  Lines        8244     8244           
=======================================
  Hits         4055     4055           
  Misses       3519     3519           
  Partials      670      670
Flag Coverage Δ
#linux 52.6% <61.53%> (ø) ⬆️
#windows 44.25% <50%> (ø) ⬆️
Impacted Files Coverage Δ
snapshots/overlay/overlay.go 56.13% <100%> (ø) ⬆️
snapshots/storage/bolt.go 61.89% <50%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fe4e30c...db742c9. Read the comment docs.

improve error message for CommitActive
Signed-off-by: yason <[email protected]>
@yanxuean yanxuean mentioned this pull request Dec 2, 2017
Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

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

LGTM

Comment thread snapshots/storage/bolt.go
spbkt := bkt.Bucket([]byte(si.Parent))
if spbkt == nil {
return errors.Wrap(errdefs.ErrNotFound, "missing parent")
return errors.Wrapf(errdefs.ErrNotFound, "missing parent snapshot of %q", key)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it would be good to include si.Parent in the error message as well: "missing parent %q of snapshot %s", si.Parent, key

Comment thread snapshots/storage/bolt.go
// Updates parent back link to use new key
if err := pbkt.Put(parentKey(pid, id), []byte(name)); err != nil {
return errors.Wrap(err, "failed to update parent link")
return errors.Wrapf(err, "failed to update parent link from %q to %q", key, name)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Isn't the previous parent id pid not key ? So the message should be something like: "failed to update parent link of %q to %q", key, name ?

@crosbymichael crosbymichael added this to the 1.0.0 milestone Dec 4, 2017
Copy link
Copy Markdown
Member

@stevvooe stevvooe left a comment

Choose a reason for hiding this comment

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

LGTM

@crosbymichael
Copy link
Copy Markdown
Member

LGTM

@crosbymichael crosbymichael merged commit 617c63d into containerd:master Dec 4, 2017
@yanxuean yanxuean deleted the withSnapshotBucket branch July 21, 2018 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve debug logging

6 participants