Skip to content
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

sql: unexpected non-zero bytes limit for txnKVStreamer on remote lookups #108206

Closed
yuzefovich opened this issue Aug 4, 2023 · 0 comments · Fixed by #108208
Closed

sql: unexpected non-zero bytes limit for txnKVStreamer on remote lookups #108206

yuzefovich opened this issue Aug 4, 2023 · 0 comments · Fixed by #108208
Assignees
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

Comments

@yuzefovich
Copy link
Member

yuzefovich commented Aug 4, 2023

The following logic test results in an internal error:

# LogicTest: multiregion-9node-3region-3azs !metamorphic-batch-sizes

# Set the closed timestamp interval to be short to shorten the amount of time
# we need to wait for the system config to propagate.
statement ok
SET CLUSTER SETTING kv.closed_timestamp.side_transport_interval = '10ms';

statement ok
SET CLUSTER SETTING kv.closed_timestamp.target_duration = '10ms';

statement ok
CREATE DATABASE multi_region_test_db PRIMARY REGION "ca-central-1" REGIONS "ap-southeast-2", "us-east-1" SURVIVE REGION FAILURE;

statement ok
USE multi_region_test_db

statement ok
CREATE TABLE parent (
  p_id INT,
  INDEX (p_id),
  FAMILY (p_id)
) LOCALITY REGIONAL BY ROW;

statement ok
CREATE TABLE child (
  c_id INT PRIMARY KEY,
  c_p_id INT,
  INDEX (c_p_id),
  FAMILY (c_id, c_p_id)
) LOCALITY REGIONAL BY ROW;

statement ok
INSERT INTO parent (crdb_region, p_id)
VALUES ('ap-southeast-2', 10), ('ca-central-1', 20), ('us-east-1', 30)

statement ok
INSERT INTO child (crdb_region, c_id, c_p_id)
VALUES ('ap-southeast-2', 10, 10), ('ca-central-1', 20, 20), ('us-east-1', 30, 30)

statement ok
SET tracing = on,kv,results; SELECT * FROM child WHERE EXISTS (SELECT * FROM parent WHERE p_id = c_p_id) AND c_id = 20; SET tracing = off
        expected success, but found
        (XX000) internal error: unexpected non-zero bytes limit for txnKVStreamer
        kv_batch_streamer.go:79: in SetupNextFetch()
        DETAIL: stack trace:
        github.com/cockroachdb/cockroach/pkg/sql/row/kv_batch_streamer.go:79: SetupNextFetch()
        github.com/cockroachdb/cockroach/pkg/sql/row/kv_fetcher.go:336: SetupNextFetch()
        github.com/cockroachdb/cockroach/pkg/sql/row/fetcher.go:542: StartScan()
        github.com/cockroachdb/cockroach/pkg/sql/rowexec/stats.go:107: StartScan()
        github.com/cockroachdb/cockroach/pkg/sql/rowexec/joinreader.go:1101: fetchLookupRow()
        github.com/cockroachdb/cockroach/pkg/sql/rowexec/joinreader.go:752: Next()
        github.com/cockroachdb/cockroach/pkg/sql/colexec/columnarizer.go:239: Next()
        github.com/cockroachdb/cockroach/pkg/sql/colexec/invariants_checker.go:93: Next()
        github.com/cockroachdb/cockroach/pkg/sql/colflow/stats.go:118: next()
        github.com/cockroachdb/cockroach/pkg/sql/colexecerror/error.go:92: CatchVectorizedRuntimeError()
        github.com/cockroachdb/cockroach/pkg/sql/colflow/stats.go:126: Next()
        github.com/cockroachdb/cockroach/pkg/sql/colflow/flow_coordinator.go:250: nextAdapter()
        github.com/cockroachdb/cockroach/pkg/sql/colexecerror/error.go:92: CatchVectorizedRuntimeError()
        github.com/cockroachdb/cockroach/pkg/sql/colflow/flow_coordinator.go:254: next()
        github.com/cockroachdb/cockroach/pkg/sql/colflow/flow_coordinator.go:286: Run()
        github.com/cockroachdb/cockroach/pkg/sql/colflow/vectorized_flow.go:316: Run()
        github.com/cockroachdb/cockroach/pkg/sql/distsql_running.go:896: Run()
        github.com/cockroachdb/cockroach/pkg/sql/distsql_running.go:1949: PlanAndRun()
        github.com/cockroachdb/cockroach/pkg/sql/distsql_running.go:1663: func3()
        github.com/cockroachdb/cockroach/pkg/sql/distsql_running.go:1666: PlanAndRunAll()
        github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:2114: execWithDistSQLEngine()
        github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1661: dispatchToExecutionEngine()
        github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:967: execStmtInOpenState()
        github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:144: func1()
        github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:3006: execWithProfiling()
        github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:143: execStmt()
        github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2220: func1()
        github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2225: execCmd()
        github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2142: run()
        github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:954: ServeConn()
        github.com/cockroachdb/cockroach/pkg/sql/pgwire/conn.go:244: processCommands()
        github.com/cockroachdb/cockroach/pkg/sql/pgwire/server.go:996: func3()   

Jira issue: CRDB-30361

@yuzefovich yuzefovich added the C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. label Aug 4, 2023
@yuzefovich yuzefovich self-assigned this Aug 4, 2023
@github-project-automation github-project-automation bot moved this to Triage in SQL Queries Aug 4, 2023
@yuzefovich yuzefovich moved this from Triage to Active in SQL Queries Aug 4, 2023
@craig craig bot closed this as completed in 695d4ec Aug 5, 2023
@github-project-automation github-project-automation bot moved this from Active to Done in SQL Queries Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant