Skip to content
Commit Detail

Commit b5ff39b

Author
Kenton Varda <kenton@cloudflare.com> 2025-05-01 13:51:50 -0500
Parents
54d4c07
Tree
48ebe0e
Facets: Refactor: Each ActorNamespace creates a kj::Directory.

Each actor namespace has always had its own directory on disk, but previously it did not create a kj::Directory for it. Instead, a single SqliteDatabase::Vfs was created for the parent of all the actor storage directories, and each sqlite file was opened by path that included the actor namespace directory.

That had two problems:
* It's ugly that an ActorNamespace could open files outside its own storage, and just has to promise to always use the correct path to its storage.
* We actually didn't give the ActorNamespace a kj::Directory at all, just to the single SqliteDatabase::Vfs. But we now want to open other kinds of files in this directory, so we need a kj::Directory. Let's just actually open the directory specific to the namespace, and create a separate Vfs per-namespace.

Files changed

1 file changed~1 modified