Repository navigation
Make MemTableRepFactory into a Customizable class - #8419
mrambacher wants to merge 33 commits into
Conversation
- Add a loaded test (via SpecialSkipListFactory) - Moved SpecialSkipListFactory into testutil.cc and hide behind a constructor. - Fix IsInstanceOf method for the factories to use the alternate names and class names - Fix db_bench and memtablerep_bench to use the new CreateFromString methods - Add test for setting the properties via configure methods
9478e32 to
9db1dd2
Compare
|
@mrambacher has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
| &skiplist_factory_info); | ||
| } | ||
|
|
||
| std::string SkipListFactory::GetId() const { |
There was a problem hiding this comment.
Any rule here to create the ID based on name:lookahead_value?
| #ifndef ROCKSDB_LITE | ||
| status = config_options.registry->NewUniqueObject(id, result); | ||
| #else | ||
| std::vector<std::string> opts_list = StringSplit(id, ':'); |
There was a problem hiding this comment.
Based on the previous code, id=name:lookahead_. But it is still strange to me to use it from the ID. not options in the "value"
There was a problem hiding this comment.
The old serialized options could contain things like memtable=VectorRepFactory. The new one will say memtable=VectorRepFactory:size. The latter form (in the new code) should be parsed just fine by the old code (I will run a compatibility test against old versions soon).
If I do not use id=name:lookahead_, then the format will be memtable={id=VectoryRepFactory; lookahead=#}. This format will not work for the old code.
If you prefer to not use the "id", I can make that work but am not sure there is any real advantage one way or another.
There was a problem hiding this comment.
I see. Then it is fine here. But maybe add comment to make it clear why.
|
@mrambacher has updated the pull request. You must reimport the pull request before landing. |
|
@mrambacher has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
|
@mrambacher has updated the pull request. You must reimport the pull request before landing. |
|
@mrambacher has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
|
@mrambacher has updated the pull request. You must reimport the pull request before landing. |
|
@mrambacher has updated the pull request. You must reimport the pull request before landing. |
|
@mrambacher has updated the pull request. You must reimport the pull request before landing. |
|
@mrambacher has updated the pull request. You must reimport the pull request before landing. |
|
@mrambacher has updated the pull request. You must reimport the pull request before landing. |
|
@mrambacher has updated the pull request. You must reimport the pull request before landing. |
|
@mrambacher has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
1 similar comment
|
@mrambacher has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
|
@mrambacher has updated the pull request. You must reimport the pull request before landing. |
|
@mrambacher has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
|
@mrambacher has updated the pull request. You must reimport the pull request before landing. |
|
@mrambacher has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
|
@mrambacher has updated the pull request. You must reimport the pull request before landing. |
|
@mrambacher has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
|
@mrambacher merged this pull request in beed864. |
Summary: This PR does the following: -> Makes the MemTableRepFactory into a Customizable class and creatable/configurable via CreateFromString -> Makes the existing implementations compatible with configurations -> Moves the "SpecialRepFactory" test class into testutil, accessible via the ObjectRegistry or a NewSpecial API New tests were added to validate the functionality and all existing tests pass. db_bench and memtablerep_bench were hand-tested to verify the functionality in those tools. Pull Request resolved: meta/rocksdb#8419 Reviewed By: zhichao-cao Differential Revision: D29558961 Pulled By: mrambacher fbshipit-source-id: 81b7229636e4e649a0c914e73ac7b0f8454c931c
Summary: This PR does the following: -> Makes the MemTableRepFactory into a Customizable class and creatable/configurable via CreateFromString -> Makes the existing implementations compatible with configurations -> Moves the "SpecialRepFactory" test class into testutil, accessible via the ObjectRegistry or a NewSpecial API New tests were added to validate the functionality and all existing tests pass. db_bench and memtablerep_bench were hand-tested to verify the functionality in those tools. Pull Request resolved: meta#8419 Reviewed By: zhichao-cao Differential Revision: D29558961 Pulled By: mrambacher fbshipit-source-id: 81b7229636e4e649a0c914e73ac7b0f8454c931c
This PR does the following:
-> Makes the MemTableRepFactory into a Customizable class and creatable/configurable via CreateFromString
-> Makes the existing implementations compatible with configurations
-> Moves the "SpecialRepFactory" test class into testutil, accessible via the ObjectRegistry or a NewSpecial API
New tests were added to validate the functionality and all existing tests pass. db_bench and memtablerep_bench were hand-tested to verify the functionality in those tools.