-
Notifications
You must be signed in to change notification settings - Fork 663
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace dict with hashtable in kvstore and db
* Add functions for embedding key and expire in robj (object.c) * When there's unused space, reserve an expire field to avoid realloting it later if expire is added. * Always reserve space for expire for large key names to avoid realloc. * Update db functions (db.c) * dbAdd, setKey and setExpire reallocate the object when embedding key * setKey does not increment the reference counter, since it would require duplicating the object * Remove code for shared integer objects. Keys are embedded in the objects, so all objects in the database need to be unique. Thus, we can't use shared objects as values. * Delete test cases about shared integers * Adjust various commands * Adjust defrag code * Improvement: Don't access the expires table before defrag has actually reallocated the object. * Adjust test cases * Adjust memory prefetch for new hash table implementation in IO-threading, using new `hashtableIncrementalFind` API * Object free to be done in main-thread while keeping obj->ptr offloading in IO-thread since the DB object is now allocated by the main-thread and not by the io-thread as it used to be. * Pass optional value to expireIfNeeded, to avoid looking up the expires table. --------- Signed-off-by: Uri Yagelnik <uriy@amazon.com> Signed-off-by: uriyage <78144248+uriyage@users.noreply.github.com> Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech> Co-authored-by: Uri Yagelnik <uriy@amazon.com>
- Loading branch information
1 parent
ac7f458
commit 1f6ca93
Showing
42 changed files
with
1,698 additions
and
1,409 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.