Document NewDefaultInMemoryKVStore options
Finding 023 - Document NewDefaultInMemoryKVStore options
ID
023
Finding
Document NewDefaultInMemoryKVStore options
Severity
1 - Informational
Description
The NewDefaultInMemoryKVStore function creates a data store with BadgerDB options that indicate usage for in-memory contexts. However, the hard-coded options use specific values without any context, which could lead to debugging oddities and inefficiencies down the line where it may not be clear why those specific values were chosen.
Recommendation
Document the rationale and/or purpose behind each option in the badger3.Options struct.
Code References
https://github.com/rollkit/rollkit/blob/eccdd0f1793a5ac532011ef4d896de9e0d8bcb9d/store/kv.go#L19