Skip to content

Add database.getDBProperty(propertyName) method for accessing DB properties #256

@kriszyp

Description

@kriszyp

RocksDB's DB interface has a GetProperty and GetIntProperty methods for accessing database properties and statistics. We should generically make this available for accessing this information. Users should be able to access properties like:

levelStats = database.getDBProperty('rocksdb.levelstats');

Some of the properties are available as integers through the GetIntProperty method. If we can't automatically determine the correct method to call, we could have a separate getDBIntProperty to access these properties:

blobFiles = database.getDBIntProperty('rocksdb.num-blob-files');

This can basically be implemented like GetOldestSnapshotTimestamp, but have the property name be passed in as an argument:
https://github.com/HarperFast/rocksdb-js/blob/main/src/binding/database.cpp#L385-L404

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions