Skip to content
This repository has been archived by the owner on Feb 12, 2019. It is now read-only.

Commit

Permalink
state_checker: when checking GC last data, don't create new ops
Browse files Browse the repository at this point in the history
Because this happens during shut down, the new ops will never be
cleaned up!  We only care about ones that actually ran GC here, so no
need to create new ones.
  • Loading branch information
strib committed Oct 31, 2018
1 parent 7e1de6b commit 64a3d44
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions libkbfs/state_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,11 @@ func (sc *StateChecker) getLastGCData(ctx context.Context,
var latestTime time.Time
var latestRev kbfsmd.Revision
for _, c := range *config.allKnownConfigsForTesting {
ops := c.KBFSOps().(*KBFSOpsStandard).getOps(context.Background(),
FolderBranch{tlfID, MasterBranch}, FavoritesOpNoChange)
ops := c.KBFSOps().(*KBFSOpsStandard).getOpsIfExists(
context.Background(), FolderBranch{tlfID, MasterBranch})
if ops == nil {
continue
}
rt, rev := ops.fbm.getLastQRData()
if rt.After(latestTime) && rev > latestRev {
latestTime = rt
Expand Down

0 comments on commit 64a3d44

Please sign in to comment.