-
Notifications
You must be signed in to change notification settings - Fork 178
mv no md expiry
- merged to master - November 1, 2016
- code complete - October 26, 2016
- development started - October 25, 2016
Basho's global expiry applies to every key within a database (a Riak vnode). Riak depends upon a special key to mark whether or not a database received a special upgrade in 2013. The special key would be subject to global expiry and logic depending upon that one key would break. This branch creates an exclusion for that one key.
Only one source file changed to support the exclusion, leveldb_os/expiry_os.cc. It contains a simple memcmp() test for the key. The remaining source file changes relate to debug and unit test support for this branch.
The function KeyTypeString() is a debug tool. It returns a pointer to a constant string that describes the key type. The function is first used in the debug tool sst_scan.
The function CompileOptionsString() is a simple tool for identifying compile time options within leveldb's LOG file. The initial implementation is a literal string.
This string is in response to a request from product management / client services.
MemTableInserterCallback() contains logic to convert a simple key into an expiry key. The "logic" is a simple "if" condition. That condition now includes a hard coded test for Riak's metadata key.
The new ExpiryDBTester::MetaDataKey test inserts exact replicas of a live metadata key and a live Riak bucket key. The test verifies that each of the keys gets appropriate treatment upon insert: metadata key is not converted for expiry and bucket is converted.