Skip to content

Update module.c with missing FLAG_REPLICA description - #4279

Merged
zuiderkwast merged 3 commits into
valkey-io:unstablefrom
Andriciuc:add-missing-replica-flag
Aug 4, 2026
Merged

Update module.c with missing FLAG_REPLICA description#4279
zuiderkwast merged 3 commits into
valkey-io:unstablefrom
Andriciuc:add-missing-replica-flag

Conversation

@Andriciuc

@Andriciuc Andriciuc commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

This PR updates module.c with a missing flag added in #2868. This allows the generate-module-api-doc.rb script to update front facing documentation for the modules-api-ref.md file in the valkey-doc repo.

I also noticed that the FLAG_PRIMARY description reads a bit weirdly: "Client is a fake client used for applying replicated commands from the primary"

Which sounds like it's actually describing a replication-link client maybe? Not literally "this client is the primary."

I could fix this as well if needed since I am writing in this PR anyway the above fix.

This PR updates module.c with a missing flag added in valkey-io#2868. This allows the generate-module-api-doc.rb script to update front facing documentation for the modules-api-ref.md file in the valkey-doc repo.

Signed-off-by: Dragos Andriciuc <andriciucdragos@protonmail.com>
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The inline documentation for VM_GetClientInfoById() now explains that VALKEYMODULE_CLIENTINFO_FLAG_REPLICA identifies replica and MONITOR connections. No executable logic or API declarations changed.

Changes

Client info documentation

Layer / File(s) Summary
Replica flag documentation
src/module.c
Documents replica and MONITOR connection semantics for VALKEYMODULE_CLIENTINFO_FLAG_REPLICA in VM_GetClientInfoById()’s returned flags.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the missing FLAG_REPLICA documentation update in module.c.
Description check ✅ Passed The description explains the FLAG_REPLICA documentation change and its purpose for generated module API documentation.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Andriciuc
Andriciuc force-pushed the add-missing-replica-flag branch from 4c3e9f6 to dce2b24 Compare July 28, 2026 10:46
@Andriciuc Andriciuc changed the title Update module.c with missing FLAG_REPLICA Update module.c with missing FLAG_REPLICA description Jul 28, 2026

@valkey-review-bot valkey-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The added line matches the implementation (src/module.c:3891 maps client->flag.replica onto VALKEYMODULE_CLIENTINFO_FLAG_REPLICA, bit 8 in src/valkeymodule.h:711) and keeps the column alignment of the surrounding list, so the doc-generator output will be correct. Two notes on the flag descriptions themselves, including an answer to the FLAG_PRIMARY question from the PR body.

The DCO check is failing on 4c3e9f6 — the commit has no Signed-off-by: trailer. git rebase HEAD~1 --signoff && git push --force-with-lease fixes it.

Comment thread src/module.c
Comment thread src/module.c Outdated
Andriciuc and others added 2 commits July 29, 2026 14:16
Co-authored-by: valkey-review-bot[bot] <282604435+valkey-review-bot[bot]@users.noreply.github.com>
Signed-off-by: Dragos Andriciuc <andriciucdragos@protonmail.com>
Co-authored-by: valkey-review-bot[bot] <282604435+valkey-review-bot[bot]@users.noreply.github.com>
Signed-off-by: Dragos Andriciuc <andriciucdragos@protonmail.com>

@zuiderkwast zuiderkwast left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@zuiderkwast
zuiderkwast merged commit 0fc8cda into valkey-io:unstable Aug 4, 2026
62 checks passed
@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.84%. Comparing base (a9d54c5) to head (014b145).
⚠️ Report is 20 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #4279      +/-   ##
============================================
- Coverage     76.88%   76.84%   -0.05%     
============================================
  Files           162      162              
  Lines         81479    81487       +8     
============================================
- Hits          62643    62616      -27     
- Misses        18836    18871      +35     
Files with missing lines Coverage Δ
src/module.c 25.41% <ø> (ø)

... and 19 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

2 participants