mirror of
https://github.com/rancher/steve.git
synced 2025-09-11 20:29:52 +00:00
Fix race condition with database reset (#804)
* Wait for garbage collection to be finished before creating a new DB * Prevent DB reset while inflight List requests * Rename cacheFor to cacheForLocked * Rename Reset to Stop * Mention DoneWithCache in README * Add RunGC to ByOptionsLister interface
This commit is contained in:
@@ -76,6 +76,18 @@ func (mr *MockByOptionsListerMockRecorder) ListByOptions(ctx, lo, partitions, na
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListByOptions", reflect.TypeOf((*MockByOptionsLister)(nil).ListByOptions), ctx, lo, partitions, namespace)
|
||||
}
|
||||
|
||||
// RunGC mocks base method.
|
||||
func (m *MockByOptionsLister) RunGC(arg0 context.Context) {
|
||||
m.ctrl.T.Helper()
|
||||
m.ctrl.Call(m, "RunGC", arg0)
|
||||
}
|
||||
|
||||
// RunGC indicates an expected call of RunGC.
|
||||
func (mr *MockByOptionsListerMockRecorder) RunGC(arg0 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunGC", reflect.TypeOf((*MockByOptionsLister)(nil).RunGC), arg0)
|
||||
}
|
||||
|
||||
// Watch mocks base method.
|
||||
func (m *MockByOptionsLister) Watch(ctx context.Context, options informer.WatchOptions, eventsCh chan<- watch.Event) error {
|
||||
m.ctrl.T.Helper()
|
||||
|
Reference in New Issue
Block a user