Skip to content

storage/engine: add FS interface and sanitize handling of aux-dir #42034

@petermattis

Description

@petermattis

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.

Metadata

Metadata

Assignees

Labels

A-storageRelating to our storage engine (Pebble) on-disk storage.C-cleanupTech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions