-
Notifications
You must be signed in to change notification settings - Fork 4.1k
storage/engine: add FS interface and sanitize handling of aux-dir #42034
Copy link
Copy link
Closed
Labels
A-storageRelating to our storage engine (Pebble) on-disk storage.Relating to our storage engine (Pebble) on-disk storage.C-cleanupTech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.
Description
The handling of Engine.GetAuxiliaryDir is a bit of a mess. diskSideloadStorage, and SSTSnapshotStorage both use the aux dir for storage, but assume that the filesystem routines in os will work on them. This is not true for in-memory engines and it tests only accidentally work because the RocksDB MemEnv does not implement full filesystem semantics (a parent directory is auto-created when a file is created).
In addition to cleaning up the handling of aux-dir, we should separate out the Engine.*File routines to their own interface. The pebble/vfs.FS interface is a good one to model on, though I think we only need a subset of that interface. For example, FS.Lock and FS.List do not appear to be needed.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-storageRelating to our storage engine (Pebble) on-disk storage.Relating to our storage engine (Pebble) on-disk storage.C-cleanupTech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.