db_virtual: fix modparam typo (db_max_consec_retrys) - #4243
Open
denys-i-didww wants to merge 1 commit into
Open
Conversation
The old name is still kept for backwards-compatibility.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
db_virtualregistersdb_max_consec_retrys; the README documentsdb_max_consec_retries. This fixes the code rather than the page, following 36a09ee(dispatcher: Fix modparam typo (ds_probing_threshhold)): the variable is renamed, both
names are registered against it, and the old one is kept so existing configurations keep
working.
This is the
db_virtualitem offered in #4242 under Not in this PR.Why the code and not the documentation
spells it correctly:
dbase.cassigns the value tocon_list[i].no_retries, threetimes;
retriesappears in 75 places and in identifiers such asno_ping_retries,max_db_retries,curr_no_retries.retrysappears seven times,and all seven are this one identifier;
retrysfrom 2009 until e941906 (docs: fix README.md typos, 5 Aug 2026) correctedit. That commit was right about the spelling; only the code had not caught up.
What this changes
int db_max_consec_retrysbecomesdb_max_consec_retries— seven occurrences acrossdb_virtual.canddbase.c— andparams[]registers both names against it:No documentation change is needed: the README already documents the correct name, and
after this it is true.
Reproduced
Built from source and run against the matching binary. A temporary probe in
virtual_mod_init()printed the variable, and the probe was thrown away afterwards:db_max_consec_retriesmodparamdb_max_consec_retrys= 42db_max_consec_retries= 7The last row is the point: the two names write to one variable, so the later assignment
wins. Before this change the second row fails on the stock 4.0 package with
parameter <db_max_consec_retries> not found in module <db_virtual>. Two controls after it:db_max_consec_retriezanddb_max_consec_retryare still refused, so the module gainedexactly the one name and not a loose match.
Compatibility
None broken. A configuration setting
db_max_consec_retryskeeps working and keepswriting the same variable; nothing in the repository sets either name, so no shipped file
or template changes behaviour. This is a functional change, so CI runs on it — no
[skip ci].AI assistance disclosure. This change and its wording were produced with AI
assistance. Every item was checked against the source before submission:
db_virtual.c:46and:98;dbase.c:109,:128,:378, declaredno_retriesatdbase.h:97and left untouched;*.cand*.h; after this changethe old spelling survives in exactly one place, the compatibility line;
git log -Sover the full history, which names e941906 andthe date;
36a09ee, and its two siblings deb76e3 (2018, cachedb_mongodb) and db6bf91
(2007, acc), both of which fixed the code without an alias;
modparam.c:78-88resolves a nameby
strcmpand breaks on the first match, so the shared pointer is not consulted, anddb_virtual's modparam dependency list is empty, so the added entry registers nodependency of its own;
rather than reasoned about.