Repository navigation
fix(core): describe looks a remembered missing index up again - #470
Merged
Merged
Conversation
… would answer it (SCHEMA-17) Story SCHEMA-17-R169. Reviewed: r0:clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…EMA-17) A describe of an index that is still absent repeats the failed lookup on every call: a GET of the index and a lookup of the template of that name, two round trips logged as several WARN lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fupelaqu
marked this pull request as ready for review
November 20, 2026 15:28
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
describenow answers whatrunwould answer for an index that another client created after a query found it missing.After a 404 on an index, the client remembers the miss for up to five minutes so that
rundoes not pay a failed lookup on every statement. Until nowdescriberead that remembered miss too. If another client then created the index (an ingest that auto-creates it, a rawPUT),describekept answering404whilerunexecuted normally. A consumer that types its results throughdescribebefore running them refused the statement for up to five minutes.Change
run(an executing statement, and a subquery while it executes) keeps the negative cache: no lookup while the miss stands, as before.describe(its attach, its pre-execution subquery scope check, per-table legs, derived-table sources) always looks the source up again. A success forgets the miss, so the nextrunis typed. A404remembers it afresh.describememo still stores successes only, so no stale answer survives the moment the index appears.Cost
A
describeof an index that is still absent repeats the failed lookup on every call: aGET <index>and a lookup of the template of that name. That is two round trips, logged as several WARN lines. This is an error path. The negative cache ofrunis unchanged. The scaladoc anddocumentation/client/search.mdstate it.Testing
DescribeRememberedMissSpec, 10 cases: it fails on the base commit 10/10 and passes here. It coversdescribe(sql),describe(statement), derived bodies, per-table describe, run-mode unchanged, the memo across the transition, and the subquery scope check.+ compilepasses on Scala 2.12 and 2.13.headerCheck scalafmtSbtCheck scalafmtCheck test:scalafmtCheck) passes.Release note
describeno longer answers a remembered404for an index another client created since; its successful lookup also lets the nextrunbe typed at once.Recorded, not fixed (pre-existing, not widened)
runthat nodescribeprecedes still runs untyped over an index found missing earlier. This is the negative cache this change keeps on purpose.🤖 Generated with Claude Code