Skip to content

Adds column families property get - #40

Merged
kasperisager merged 2 commits into
holepunchto:mainfrom
tur-nr:feature/cf-prop-get
Sep 23, 2026
Merged

kasperisager merged 2 commits into
holepunchto:mainfrom
tur-nr:feature/cf-prop-get

Conversation

@tur-nr

@tur-nr tur-nr commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Problem

rocksdb_property_get only wraps the DB::GetProperty(name, value) overload, which targets the default column family. Anything storing its data in a named family reads 0 from every property, and nearly all the useful ones are per-family: total-sst-files-size, estimate-live-data-size, total-blob-file-size, estimate-pending-compaction-bytes.

Proposal

  • rocksdb_column_family_property_get(db, column_family, name, value), wrapping the CF overload
  • Additive, so rocksdb_property_get is untouched and nothing downstream breaks

Tests

Write to a named family, flush it, then read rocksdb.total-sst-files-size both ways against the same data: the column family call reports non-zero, rocksdb_property_get reports zero. Also covers the default family reading zero through the new call, and UV_ENOENT for an unknown property name.

Swapping the implementation back to the default overload fails that first assertion, so the test discriminates between the two overloads rather than passing by construction.

@tur-nr
tur-nr requested a review from a team September 23, 2026 06:05
@kasperisager
kasperisager merged commit 89452cd into holepunchto:main Sep 23, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants