-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
roachtest: schemachange/mixed-versions failed [attempting to append refresh spans after the tracked timestamp has moved forward] #122274
Comments
roachtest.schemachange/mixed-versions failed with artifacts on release-23.2 @ 7d5f4ef0d54fe03f947c500c68f9859ec54376e7:
Parameters:
Same failure on other branches
|
both errors 🤔
|
@cockroachdb/kv We are running into the following inside this workload:
|
The error comes from here: cockroach/pkg/kv/kvclient/kvcoord/txn_interceptor_span_refresher.go Lines 720 to 734 in 8a37c9b
According to the comment, the gatekeeper interceptor should detect this error, but it looks like that isn't working, so checking if KV has any ideas why. |
This is generally a symptom of misuse of the Txn API. We have seen it happen in the past if a |
For reference, the query was: WITH
descriptors
AS (
SELECT
descriptor.id,
"parentSchemaID" AS schema_id,
namespace.name AS name,
crdb_internal.pb_to_json('desc', descriptor) AS descriptor
FROM
system.descriptor JOIN system.namespace ON namespace.id = descriptor.id
WHERE
"parentID" = (SELECT id FROM system.namespace WHERE name = current_database() AND "parentID" = 0)
),
enums AS (SELECT id, schema_id, name, descriptor->'type' AS descriptor FROM descriptors WHERE descriptor ? 'type'),
enum_members AS (SELECT *, jsonb_array_elements(descriptor->'enumMembers') AS member FROM enums)
SELECT
quote_ident(schema_id::REGNAMESPACE::STRING) || '.' || quote_ident(name) AS name,
quote_literal(member->>'logicalRepresentation') AS value,
COALESCE(member->>'direction' = 'REMOVE', false) AS dropping,
COALESCE(json_array_length(descriptor->'referencingDescriptorIds') > 0, false) AS has_references
FROM
enum_members; for which we don't use the streamer API since we have a local plan node. I doubt it's a regression (it's more likely that we just started running this query in the workload generator somewhat recently which exposed an existing bug), so I'm removing the release blocker label. |
Nathan in this has a hypothesis:
|
I think I see the problem. (I reproduced the mixed-version state of the cluster when this problem happened, but I don't think it matters.) Here is the bundle I got On 23.1 version we have the plan different from 23.2+ version. On 23.1 we have a main query within which we use the streamer API for the lookup join, so this forces us to use the LeafTxn for the main query. We also have cast to |
Hm, this might be quite tricky to solve properly. Effectively, we're running into #41992 where things like miscellaneous builtins can currently use the RootTxn at any point in time during query evaluation. I think for the time being I'll disable the streamer in this particular case (when we have a cast to Oid type), but it won't solve the problem more generally. |
roachtest.schemachange/mixed-versions failed with artifacts on release-23.2 @ e61e140a75b2f7dde9f5410c1d90e557d009c437:
Parameters:
ROACHTEST_arch=amd64
ROACHTEST_cloud=gce
ROACHTEST_coverageBuild=false
ROACHTEST_cpu=4
ROACHTEST_encrypted=false
ROACHTEST_metamorphicBuild=false
ROACHTEST_ssd=0
Help
See: roachtest README
See: How To Investigate (internal)
See: Grafana
Same failure on other branches
This test on roachdash | Improve this report!
Jira issue: CRDB-37787
The text was updated successfully, but these errors were encountered: