Skip to content

Read-only mode #404

@kriszyp

Description

@kriszyp

To complement HarperFast/rocksdb-js#490, add read-only mode support for Harper. Obviously this means opening RocksDB in read-only mode (LMDB actually has a read-only mode as well). From my quick tests, the most obvious additional thing is to disable analytics (analytics/write.ts has a nice big switch for this, I think). I'd guess we probably want to control this with an env variable, but other possibilities include checking for having a harper parent process, or trying write mode with fallback to read-only mode. The known "use case" is for when NextJS launches build processes (and we aren't directly making the spawn call, it is somewhere in the NextJS code).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions