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

kv: introduce non-blocking ranges zone configs #57689

Closed
nvanbenschoten opened this issue Dec 8, 2020 · 0 comments · Fixed by #59304
Closed

kv: introduce non-blocking ranges zone configs #57689

nvanbenschoten opened this issue Dec 8, 2020 · 0 comments · Fixed by #59304
Assignees
Labels
A-kv-transactions Relating to MVCC and the transactional model. A-multiregion Related to multi-region C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Comments

@nvanbenschoten
Copy link
Member

Needed for non-blocking transactions: #52745.

Introduce a new non_blocking_range boolean attribute to zone configs. Will configure a range's leaseholder to close times out in advance of present time. See the RFC for details.

@nvanbenschoten nvanbenschoten added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-kv-transactions Relating to MVCC and the transactional model. A-multiregion Related to multi-region T-multiregion labels Dec 8, 2020
@nvanbenschoten nvanbenschoten self-assigned this Dec 8, 2020
nvanbenschoten added a commit to nvanbenschoten/cockroach that referenced this issue Jan 22, 2021
Closes cockroachdb#57689.

This commit adds a new non_blocking_txns field to the ZoneConfig struct.
non_blocking_txns specifies whether transactions operating on the range(s)
should be configured to provide non-blocking behavior, meaning that reads
can be served consistently from all replicas and do not block on writes. In
exchange, writes get pushed into the future and must wait on commit to
ensure linearizability. For more, see:
https://github.com/cockroachdb/cockroach/blob/master/docs/RFCS/20200811_non_blocking_txns.md

Release note: None
craig bot pushed a commit that referenced this issue Jan 27, 2021
59304: config/sql: add global_reads field to ZoneConfig, use for GLOBAL tables r=ajstorm a=nvanbenschoten

Closes #57689.

This PR adds a new `global_reads` field to the `ZoneConfig` struct. `global_reads` specifies whether transactions operating over the range(s) should be configured to provide non-blocking behavior, meaning that reads can be served consistently from all replicas and do not block on writes. In exchange, writes get pushed into the future and must wait on commit to ensure linearizability. For more, see: https://github.com/cockroachdb/cockroach/blob/master/docs/RFCS/20200811_non_blocking_txns.md

The PR then enables `global_reads` for tables with the `GLOBAL` locality config. `global_reads` are not yet hooked up in KV because we don't yet have per-range closed timestamp tracking, but this completes the SQL-level work for GLOBAL tables, with the exception of #57663, which will add non-voting replicas (at the database zone config level) for all database regions that don't already have a voting replica.

Release note (sql change): A new, unused field called "global_reads" was added to zone configurations. The field does not yet have any effect.

Co-authored-by: Nathan VanBenschoten <[email protected]>
@craig craig bot closed this as completed in 86d94aa Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-kv-transactions Relating to MVCC and the transactional model. A-multiregion Related to multi-region C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant