Update key-only but not value with minimal disk io?

I have a need to frequently change the key associated with a value, but don’t need to change the value itself. Is there a way to have badgerdb do this without touching the value log, or doing as minimal IO as possible?


You could write the canonical key-value first, then write the keys whose value is the canonical key. That level of indirection would allow you to avoid expensive value writes.

Thanks Manish. I thought there might be an optimization built in already for the equivalent of a filesystem “rename” or move of a directory.