#390·sonic

`store.kv.database.write_buffer` documentation is misleading

Author: RemiBardonCreated Aug 6, 2026Updated Aug 6, 2026
Labelsarea:docs

The store.kv.database.write_buffer documentation states:

  • database.write_buffer (type: integer, allowed: numbers, default: 16384) — Maximum size in KB of the database write buffer, after which data gets flushed to disk (ie. 16384 is 16MB; the size should be a multiple of 1024, eg. 128 * 1024 = 131072 for 128MB)

but the code does

rust
db_options.set_write_buffer_size(db_conf.write_buffer * 1024);

IMO, “the size should be a multiple of 1024” is unclear.