cockroachdb / cockroachdb/cockroach

opt: support multi-column-family checks during updates under read committed isolation

Open
#112,488 2 comments 0 reactions 0 assignees View on GitHub
A-read-committed A-sql-optimizer C-enhancement docs-done docs-known-limitation T-sql-queries
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

When performing an UPDATE, UPSERT, or INSERT ON CONFLICT into a table with multiple column families, if there is a multi-column check constraint on the table that involves multiple column families we might read some column families that are not modified. Under Read Committed isolation we need to take shared locks when reading these unmodified column families, to maintain the check constraint in the face of concurrent modifications. We currently do not do this, so this is disallowed under Read Committed isolation.

Jira issue: CRDB-32442

Epic CRDB-38938

Contributor guide

Open the contributing guide

Research direction

Start by tracing UPDATE, UPSERT, and INSERT ON CONFLICT handling for multi-column check constraints under Read Committed isolation, then read Jira CRDB-32442 and epic CRDB-38938 for surrounding design context. Done means these operations support checks spanning multiple column families while preserving correctness under concurrent modifications.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, sql
Domain
backend, databases, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.