Skip to content

Commit

Permalink
stores: cleanup PR
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjan committed Apr 22, 2024
1 parent fb9e52b commit d4b2801
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
8 changes: 4 additions & 4 deletions stores/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -2748,12 +2748,12 @@ func (s *SQLStore) pruneSlabsLoop() {
})
} else {
s.alerts.DismissAlerts(s.shutdownCtx, pruneSlabsAlertID)

s.mu.Lock()
s.lastPrunedAt = time.Now()
s.mu.Unlock()
}
cancel()

s.mu.Lock()
s.lastPrunedAt = time.Now()
s.mu.Unlock()
}
}

Expand Down
3 changes: 0 additions & 3 deletions stores/metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1219,13 +1219,10 @@ func TestSQLMetadataStore(t *testing.T) {
}

// Remove the first slab of the object.
ts := time.Now()
obj1.Slabs = obj1.Slabs[1:]
fullObj, err = ss.addTestObject(objID, obj1)
if err != nil {
t.Fatal(err)
} else if err := ss.waitForPruneLoop(ts); err != nil {
t.Fatal(err)
} else if !reflect.DeepEqual(*fullObj.Object, obj1) {
t.Fatal("object mismatch")
}
Expand Down

0 comments on commit d4b2801

Please sign in to comment.