Skip to content

Fix[mqb]: use 100x multiplier for rc enums reaching -10 - #1814

Merged
kaikulimu merged 1 commit into
bloomberg:mainfrom
kaikulimu:rc-enum-fix
Oct 13, 2026
Merged

kaikulimu merged 1 commit into
bloomberg:mainfrom
kaikulimu:rc-enum-fix

Conversation

@kaikulimu

@kaikulimu kaikulimu commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Composite return codes like rc * 10 + rc_X only work if every local rc_X is a single digit, so the last digit gives the local code and the rest gives the callee's. IncoreClusterStateLedger::applyImpl (rc_APPLY_RECORD_FAILURE = -10) and FileStore::writeJournalRecord (rc_QUEUE_DELETION_ERROR = -10) break this, so their codes no longer decode correctly. For example, callee -1 with rc_APPLY_RECORD_FAILURE gives -20, which reads as callee -2.
  • Those 4 sites now use * 100, the multiplier already used elsewhere for enums that reach -10. No other * 10 site in the repo has an enum this deep.

Signed-off-by: Yuan Jing Vincent Yan <yyan82@bloomberg.net>
@kaikulimu
kaikulimu requested a review from a team as a code owner October 13, 2026 20:33
@kaikulimu
kaikulimu merged commit 9bbd0cc into bloomberg:main Oct 13, 2026
91 checks passed
@kaikulimu
kaikulimu deleted the rc-enum-fix branch October 13, 2026 20:56
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