fix: Relationship ordering in the pushdown, and two corRest tests - #62
Merged
Conversation
Needs corNgsild#12 (the matcher half) and corNgsild#13 (hops/joinLevel)
merged first - the matrix's Relationship rows and url_param_join's expects
are pinned against both.
RELATIONSHIP ORDERING (§ 7.2.3.3)
The instance object is $$kv.v and carries its own `type`, so excluding a
Relationship is one more conjunct. Two placements, and only one is right:
- for the ordering operators, INSIDE the per-instance predicate;
- for !~=, OUTSIDE the negation. A guard inside the predicate that !~=
negates turns "this target is excluded" into "this target matches" -
the third time today that trap has come up.
The string guard beside it had to widen at the same time, from "the target
is a string" to "the target is a string OR an array with a string in it",
or `A!~=urn` dropped ["aaa","mid","zzz"] on mongoc alone.
LEGACY itemType RETIRED FROM BOTH CONSUMERS
mongocEntityQuery and troeQTreeToSql now read itemTypeV directly. The
fallback they carried was already dead: parseValueList is the only place
that builds an LdQValueList and it always allocates the per-item types.
corNgsild can drop the field once this merges.
TWO corRest TESTS - and only one of them covers what it looks like
distop_query_big_response a forwarded query whose response outgrows
the engine's 8 KB read buffer. VERIFIED to
reach the doubling: instrumented, fires once.
distop_query_pooled_connection_reuse
a forwarded query survives the Context
Source restarting, pooled socket and all.
⚠️ The second does NOT cover the `fromPool && !retried` retry blocks, and
its header says so. Instrumenting proved it: the second query DOES take the
pooled socket (POOLGET hits, so the liveness probe does not catch the death
either - the peer's FIN has not arrived when poll() runs), and yet neither
retry block is entered and the request succeeds anyway. It passes with both
retry blocks compiled out, and with the probe compiled out. Whatever
recovers it, it is not those two, and they stay uncovered.
640/640 mongoc, 590/590 corDB.
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.
url_param_join's expects are pinned against both.Relationship ordering (§ 7.2.3.3)
The instance object is
$$kv.vand carries its owntype, so excluding a Relationship is one more conjunct. Two placements, and only one is right:!~=, outside the negation — a guard inside the predicate that!~=negates turns "this target is excluded" into "this target matches". That's the third time today this trap has come up.The string guard beside it had to widen at the same time, from "the target is a string" to "the target is a string or an array with a string in it", or
A!~=urndropped["aaa","mid","zzz"]on mongoc alone.Legacy
itemTyperetired from both consumersmongocEntityQueryandtroeQTreeToSqlnow readitemTypeVdirectly. The fallback they carried was already dead:parseValueListis the only place that builds anLdQValueList, and it always allocates the per-item types. corNgsild can drop the field once this merges.Two corRest tests — and only one covers what it looks like
distop_query_big_responsedistop_query_pooled_connection_reusefromPool && !retriedretry blocks, and its header says so. Instrumenting proved it: the second query does take the pooled socket (POOLGEThits, so the liveness probe doesn't catch the death either — the peer's FIN hasn't arrived whenpoll()runs), and yet neither retry block is entered and the request succeeds anyway. It passes with both retry blocks compiled out, and with the probe compiled out.Whatever recovers it, it is not those two, and they stay uncovered. Worth knowing before someone reads that test as covering the retry — finding it out took making each change and running it.
Verification: 640/640 mongoc, 590/590 corDB.