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

Impl commands disable #417

Merged
merged 13 commits into from
May 27, 2023
Merged

Impl commands disable #417

merged 13 commits into from
May 27, 2023

Conversation

danielealbano
Copy link
Owner

This PR introduces a new mechanism to disable commands via the config file, a new parameter called disabled_commands has been introduced.

The PR changes the following things:

  • at the start, in the redis program ctor, the code checks if there is a list of disabled commands defined in the config and if yes builds an hashtable out of the list
  • every time a command is found in the commands info hashtable, it's checked against the list of disabled commands and if the command is disabled returns an error
  • at the shutdown, the redis program dtor hook is used to free up the hashtable with the disabled commands

@danielealbano danielealbano added the enhancement New feature or request label May 27, 2023
@danielealbano danielealbano added this to the v0.4 milestone May 27, 2023
@danielealbano danielealbano self-assigned this May 27, 2023
@danielealbano danielealbano added this to In Progress in cachegrand via automation May 27, 2023
@danielealbano danielealbano enabled auto-merge (squash) May 27, 2023 21:06
@codecov
Copy link

codecov bot commented May 27, 2023

Codecov Report

Patch coverage: 65.71% and project coverage change: +0.03 🎉

Comparison is base (5ef5bf7) 76.85% compared to head (7d34c2b) 76.88%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #417      +/-   ##
==========================================
+ Coverage   76.85%   76.88%   +0.03%     
==========================================
  Files         198      199       +1     
  Lines       13586    13621      +35     
==========================================
+ Hits        10441    10472      +31     
- Misses       3145     3149       +4     
Flag Coverage Δ
unittests 76.88% <65.71%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/config_cyaml_schema.c 100.00% <ø> (ø)
src/module/redis/module_redis.c 66.67% <55.56%> (-16.67%) ⬇️
src/module/redis/module_redis_commands.c 85.25% <63.64%> (-4.75%) ⬇️
src/module/redis/module_redis_commands.h 100.00% <100.00%> (ø)
src/module/redis/module_redis_connection.c 74.70% <100.00%> (+0.19%) ⬆️

... and 5 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@danielealbano danielealbano merged commit bf92b35 into main May 27, 2023
6 checks passed
@danielealbano danielealbano deleted the impl-commands-disable branch May 27, 2023 21:13
cachegrand automation moved this from In Progress to Completed May 27, 2023
Valkyrie00 added a commit that referenced this pull request Jun 1, 2023
* main: (27 commits)
  Bug fix aarch64 build issue (#427)
  Further increase to 7.5s the tls receive before the handshake is completed (#426)
  Bug fix tls redis benchmark (#425)
  Fix tls handshake wait blocks listener accept (#424)
  Disable required authentication by default (#423)
  Distinguish between failures during prep or during processing (#422)
  Further reduce the aggressiveness of the keys eviction fiber (#421)
  Bug catch negative counters (#420)
  Implement additional test for disabled commands (#419)
  Reduce the aggressiveness of the keys eviction fiber (#418)
  Impl commands disable (#417)
  Fix hashtable locking (#415)
  The entry index can be deleted once set in the hashtable (#416)
  Ensure that the hashtable for the redis commands is large enough (#414)
  Implement PING inline tests (#413)
  Add support for the PING command over the inline protocol (#412)
  Zero memory when upsize args list (#411)
  Implement Redis config get command (#410)
  Enforce TTL (#409)
  Fix the Redis module doc header (#408)
  ...
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.

None yet

1 participant