fdb push: always resolve tier name in _hndl_open#6063
Draft
emelialei88 wants to merge 1 commit into
Draft
Conversation
After 8a158e0 replaced class_override with a class != get_my_mach_class() check, _hndl_open would pass the unresolved string "default" to cdb2_open when the remote DB is on the same tier as the local node. This caused the literal "default" to leak into the sockpool typestr, which is invalid — the tier slot must contain a resolved class name. Always resolve via mach_class_class2name regardless of whether the remote tier matches the local one. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
roborivers
approved these changes
Jul 7, 2026
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Success ✓.
Regression testing: Success ✓.
The first 10 failing tests are:
sc_resume_logicalsc_generated **quarantined**
reco-ddlk-sql **quarantined**
consumer_non_atomic_default_consumer_generated **quarantined**
sc_downgrade [timeout] **quarantined**
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
class_overridewithpush->class != get_my_mach_class(),_hndl_openpasses the unresolved literal"default"tocdb2_openwhen the remote DB is on the same tier as the local node. This leaks"default"into the sockpool typestr (e.g.comdb2/<db>/default/newsql/<policy>), which is invalid — the tier slot must contain a resolved name likedevorprod."default"typestr). InCDB2API_TESTbuilds it aborts incdb2_socket_pool_get.mach_class_class2name(push->class)regardless of whether the tier matches the local machine's class.Test plan
_hndl_openno longer produces a typestr containing"default"when remote and local tiers matchdb:execon same-tier DB underCDB2API_TESTbuild — no longer abortsfdb_pushtest suite passes (exercises the_hndl_openpath, though it does not build withCDB2API_TESTso it cannot catch the typestr issue directly)🤖 Generated with Claude Code