mirror of
https://github.com/rancher/steve.git
synced 2025-09-22 20:09:34 +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:
@@ -100,6 +100,8 @@ func makeListOptionIndexer(ctx context.Context, opts ListOptionIndexerOptions, s
|
||||
return nil, "", err
|
||||
}
|
||||
|
||||
go listOptionIndexer.RunGC(ctx)
|
||||
|
||||
return listOptionIndexer, dbPath, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user