-
-
Notifications
You must be signed in to change notification settings - Fork 54
Support 'prefix_extractor' option? #160
Comments
A PR is welcome. I don't know what |
From the looks of things there are three options, via classes:
Not sure whether SamePrefixTransform is enabled - its hidden behind a GFLAGS macro check, which is not defined according to my vscode. Its also in a test file - prefix_test.cc presumably this could be exposed to the js side as options: {
...
prefix_extractor? : {
fixed?: number,
capped?: number,
same?: string
}
} where ? is optional notation and only 1 of them should be be defined. on the binding side (db_open), it would require checking which is defined (if any), and mapping to the corresponding class; i.e. options.prefix_extractor.reset(NewFixedPrefixTransform(2)); before being sent to the open the db. |
What does it do? |
Not 100% sure - but it seems it can optimize seeking/iterating when you're doing composite keys. https://github.com/facebook/rocksdb/wiki/Prefix-Seek#defining-a-prefix |
I don't need this tbh - but I fancied having a gander at the code-base and tried to add it. #168 |
I look at the source code and find none about 'prefix_extractor'.
Will rocksdb support 'prefix_extractor' option?
The text was updated successfully, but these errors were encountered: