Repository navigation
Conversation
A script that creates a temp table and drops it itself failed after every statement had run: syncCatalog handed the dropped temp table to deleteTableMetadata, which rejects its two-part name path with "unexpected table name path: [<project> <table>]". The job then failed with jobInternalError, which clients retry, so the error surfaced only after the client's retry deadline. Temp tables are scoped to the script that created them and belong to no dataset, so skip them in both directions of the sync. The regression test also needs googlesqlite to stop failing the end-of-script cleanup of a temp table the script already dropped (Flip-to/googlesqlite fix/temp-table-cleanup-after-drop); with stock googlesqlite v0.3.1 that error comes first.
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.
Depends on goccy/googlesqlite#92: with googlesqlite v0.3.1 the engine's own cleanup error comes first.
Problem
A script that creates a temp table and drops it fails, after every statement has run:
It is reported as
jobInternalError, so clients retry it and it surfaces only after their retry deadline.Cause
syncCatalogpasses every table inChangedCatalog.Table.AddedandDeletedtoaddTableMetadata/deleteTableMetadata, temp tables included. A temp table's name path is[project, table], with no dataset, so both reject it.Fix
syncCatalogskips temp tables in both directions. They are scoped to the script that created them and belong to no dataset, so there is no dataset metadata to add or remove.Tests
server/temp_table_script_test.go: three scripts (CTAS then DROP, a temp table left for the cleanup, CREATE and DROP insideBEGIN ... END). Each must succeed, and afterwards no temp table may be listed as dataset metadata.Before (with googlesqlite#92 applied, so this layer's error is the one that shows):
That message is the Go client retrying the insert after the first attempt failed with
unexpected table name path.After: passes.
go test ./...has no new failures againstmain.