Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement support for RMW operations and update the SET command to use them when needed #179

Conversation

danielealbano
Copy link
Owner

This PR introduces 4 groups of changes:

  • RMW (Read-Modify-Write) operations in the multi producer mutli consumer hashtable with the ability to commit an update, commit a delete or abort the operation
  • RMW operations in the storage db, with the ability to commit an update, commit a delete or abort the operation, which will actual become a commit delete if the key being accessed is expired and no new values are supplied and the delete is not requested
  • The SET command now properly supports the NX, XX, GET and KEEPTTL options
  • The integration tests for the currently supported Redis commands have been improved drammatically making them much more simple and understandable and a new set of tests have been introduced for the SET command

This PR closes the issue #173

…ength in storage_db_get_entry_index_prep_for_read
…d struct to reflect that is just a status being tracked
…ot try to hold twice the same lock if a read is being carried out in an rmw operation meanwhile ensuring that the entry index will be purged and/or the hashtable bucket emptied if necessary
…t/expected, and add a few tests to better cover the parameters combinations in SET
@danielealbano danielealbano added the enhancement New feature or request label Aug 17, 2022
@danielealbano danielealbano added this to the v0.2 milestone Aug 17, 2022
@danielealbano danielealbano self-assigned this Aug 17, 2022
@danielealbano danielealbano added this to In Progress in cachegrand via automation Aug 17, 2022
@codecov
Copy link

codecov bot commented Aug 17, 2022

Codecov Report

Merging #179 (bb45bcd) into main (cfeaa33) will increase coverage by 0.27%.
The diff coverage is 86.29%.

@@            Coverage Diff             @@
##             main     #179      +/-   ##
==========================================
+ Coverage   78.75%   79.02%   +0.27%     
==========================================
  Files         104      105       +1     
  Lines        6583     6749     +166     
==========================================
+ Hits         5184     5333     +149     
- Misses       1399     1416      +17     
Impacted Files Coverage Δ
...a_structures/hashtable/mcmp/hashtable_support_op.c 100.00% <ø> (ø)
...c/module/redis/command/module_redis_command_mset.c 0.00% <0.00%> (ø)
src/storage/db/storage_db.c 57.24% <76.25%> (+4.32%) ⬆️
...rc/module/redis/command/module_redis_command_set.c 86.67% <87.76%> (+5.71%) ⬆️
.../data_structures/hashtable/mcmp/hashtable_op_rmw.c 98.15% <98.15%> (ø)
.../data_structures/hashtable/mcmp/hashtable_op_set.c 100.00% <100.00%> (ø)
...uctures/hashtable/mcmp/hashtable_support_op_arch.c 93.87% <100.00%> (+0.09%) ⬆️
...rc/module/redis/command/module_redis_command_del.c 81.82% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@danielealbano danielealbano merged commit 6d895df into main Aug 17, 2022
@danielealbano danielealbano deleted the 173-implement-support-for-read-modify-write-operations-in-the-hashtable-and-in-the-storage-db branch August 17, 2022 22:00
cachegrand automation moved this from In Progress to Completed Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
cachegrand
  
Completed
Development

Successfully merging this pull request may close these issues.

Implement support for read modify write operations in the hashtable and in the storage db
1 participant