fix(seaweed-volume): accept redb aliases for --index (#9237)

fix(seaweed-volume): accept redb aliases for --index and rename kinds

The Rust volume server's disk-backed index uses redb internally
(see RedbNeedleMap), but --index only accepted the legacy `leveldb`
spellings, contradicting the wiki and forcing users to read source to
figure out what value to pass.

- --index now accepts memory|redb|redbMedium|redbLarge as the canonical
  names, with leveldb/leveldbMedium/leveldbLarge kept as aliases.
- Rename NeedleMapKind variants LevelDb*->Redb* so the in-tree names
  match the actual backend.
- Update help text and add a parse-table test covering both names.

Refs #9234.
This commit is contained in:
Chris Lu authored and GitHub committed 2026-04-27 01:44:40 -07:00
1 parent 045ace29d5
commit 4c4d53ce23
3 files changed
+31 -10

No files matched your search

+3 -3
View File
@@ -146,9 +146,9 @@ impl NeedleMapMetric {
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum NeedleMapKind {
InMemory,
LevelDb,
LevelDbMedium,
LevelDbLarge,
Redb,
RedbMedium,
RedbLarge,
}
// ============================================================================
+1 -1
View File
@@ -776,7 +776,7 @@ impl Volume {
fn load_index(&mut self) -> Result<(), VolumeError> {
let use_redb = matches!(
self.needle_map_kind,
NeedleMapKind::LevelDb | NeedleMapKind::LevelDbMedium | NeedleMapKind::LevelDbLarge
NeedleMapKind::Redb | NeedleMapKind::RedbMedium | NeedleMapKind::RedbLarge
);
let idx_path = self.file_name(".idx");