Repository navigation
fix(postgres): keep draining resolved type dependencies in fill_cache - #4498
Open
ducnhan123-co wants to merge 1 commit into
Open
ducnhan123-co wants to merge 1 commit into
ducnhan123-co wants to merge 1 commit into
Conversation
`resolved_dependencies` contains rows already removed from `missing_dependencies`. When a dependent row still had an uncached dependency, `continue 'outer` discarded the rest of the deque, leaving their dependents unresolved. Keep draining the deque after re-registering the blocked row. Fixes transact-rs#4497.
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.
Does your PR solve an issue?
fixes #4497
Is this a breaking change?
No.
Summary
TypeResolver::fill_cachestores rows removed frommissing_dependenciesin a localresolved_dependenciesdeque. If one of those rows still needed another uncached type, thecontinue 'outerpath abandoned the rest of the deque. Rows waiting on them stayed inmissing_dependencies, andfill_cacheeventually returnedunable to resolve type OIDs.This keeps draining the deque after re-registering the blocked row, so every row taken out of
missing_dependenciesis either cached or registered again under its new missing OID.Test
Added
it_describes_nested_custom_typesintests/postgres/describe.rsusing the nested composite/array schema from the issue and a fresh connection. It fails onmainwithProtocol("unable to resolve type OIDs: [Oid(17324)]")and passes with the fix. Fulltests/postgresandtests/postgres-describesuites pass (62 passed / 2 ignored and 7 passed).