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

Add support for MustObeyClient Module API #1582

Open
wants to merge 2 commits into
base: unstable
Choose a base branch
from

Conversation

KarthikSubbarao
Copy link
Member

@KarthikSubbarao KarthikSubbarao commented Jan 18, 2025

This PR adds support for MustObeyClient Module API.

The purpose of this API is for Modules to handle commands / callbacks knowing whether commands are arriving from the primary client or AOF client and should never be rejected.

A use case is that Modules can have validation logic in command handlers which only should be executed on primary nodes. Replica nodes must obey commands replicated.

Will add tests once/if we agree on the use case and syntax of the Module API

Signed-off-by: KarthikSubbarao <[email protected]>
Copy link

codecov bot commented Jan 18, 2025

Codecov Report

Attention: Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 70.95%. Comparing base (2d0b8e3) to head (c53e3ac).

Files with missing lines Patch % Lines
src/module.c 25.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #1582      +/-   ##
============================================
+ Coverage     70.94%   70.95%   +0.01%     
============================================
  Files           121      121              
  Lines         65132    65136       +4     
============================================
+ Hits          46207    46218      +11     
+ Misses        18925    18918       -7     
Files with missing lines Coverage Δ
src/module.c 9.61% <25.00%> (+0.01%) ⬆️

... and 11 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant