log when a lease expires
This makes it easier to debug GC-related issues, where a reference is unexpectedly released. Signed-off-by: Alex Couture-Beil <alex@mofo.ca>
This commit is contained in:
parent
ad9d1a82f1
commit
f3df7f7391
@ -260,6 +260,7 @@ func (c *gcContext) scanRoots(ctx context.Context, tx *bolt.Tx, nc chan<- gc.Nod
|
|||||||
log.G(ctx).WithError(err).WithField("lease", string(k)).Infof("ignoring invalid expiration value %q", string(expV))
|
log.G(ctx).WithError(err).WithField("lease", string(k)).Infof("ignoring invalid expiration value %q", string(expV))
|
||||||
} else if expThreshold.After(exp) {
|
} else if expThreshold.After(exp) {
|
||||||
// lease has expired, skip
|
// lease has expired, skip
|
||||||
|
log.G(ctx).WithField("lease", string(k)).Debug("expired lease")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user