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

Read Committed 40001 errors; lock promotion #18522

Merged
merged 9 commits into from May 14, 2024
Merged

Conversation

taroface
Copy link
Contributor

@taroface taroface commented May 6, 2024

DOC-9699
DOC-9600
DOC-9878
DOC-9869
DOC-9969
DOC-9621

  • Remove Preview callout for Read Committed in 24.1
  • Add enterprise license info
  • Clarify that Read Committed txns don't require client-side retry handling
  • Document lock promotion behavior (in SELECT FOR UPDATE/SHARE doc)
  • Update description of Read Committed cluster setting behavior (true by default)
  • Update various docs to more strongly incorporate Read Committed. Question for reviewers: Do the Life of a Distributed Transaction and Transaction Layer (architecture) docs require more substantial updates? @nvanbenschoten @michae2

The above updates are roughly separated by commit, in case it's easier to review that way.

@taroface taroface changed the title Read Committed 40001 errors; lock promotion [WIP] Read Committed 40001 errors; lock promotion May 6, 2024
Copy link

github-actions bot commented May 6, 2024

Files changed:

Copy link

netlify bot commented May 6, 2024

Deploy Preview for cockroachdb-interactivetutorials-docs canceled.

Name Link
🔨 Latest commit 85136c9
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-interactivetutorials-docs/deploys/66437c7d7ad7360008ad3f92

Copy link

netlify bot commented May 6, 2024

Deploy Preview for cockroachdb-api-docs canceled.

Name Link
🔨 Latest commit 85136c9
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-api-docs/deploys/66437c7d28a06d0008e89bf7

Copy link

netlify bot commented May 6, 2024

Netlify Preview

Name Link
🔨 Latest commit 85136c9
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-docs/deploys/66437c7d4a7fd20008586c8e
😎 Deploy Preview https://deploy-preview-18522--cockroachdb-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@taroface taroface changed the title [WIP] Read Committed 40001 errors; lock promotion Read Committed 40001 errors; lock promotion May 7, 2024
src/current/v24.1/read-committed.md Outdated Show resolved Hide resolved
src/current/v24.1/read-committed.md Outdated Show resolved Hide resolved
src/current/v24.1/demo-serializable.md Show resolved Hide resolved
Copy link

@michae2 michae2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are really excellent docs!

src/current/v24.1/read-committed.md Outdated Show resolved Hide resolved
src/current/v24.1/read-committed.md Outdated Show resolved Hide resolved
src/current/v24.1/transactions.md Outdated Show resolved Hide resolved
@taroface taroface requested a review from rafiss May 9, 2024 20:44
Copy link
Contributor

@rafiss rafiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"check whether transactions are being upgraded" lgtm!

Copy link
Contributor

@mdlinville mdlinville left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few nits

@@ -1,6 +1,6 @@
CockroachDB requires moderate levels of clock synchronization to preserve data consistency. For this reason, when a node detects that its clock is out of sync with at least half of the other nodes in the cluster by 80% of the maximum offset allowed, it spontaneously shuts down. This offset defaults to 500ms but can be changed via the [`--max-offset`]({% link {{ page.version.version }}/cockroach-start.md %}#flags-max-offset) flag when starting each node.

While [serializable consistency](https://wikipedia.org/wiki/Serializability) is maintained regardless of clock skew, skew outside the configured clock offset bounds can result in violations of single-key linearizability between causally dependent transactions. It's therefore important to prevent clocks from drifting too far by running [NTP](http://www.ntp.org/) or other clock synchronization software on each node.
While [`SERIALIZABLE`]({% link {{ page.version.version }}/demo-serializable.md %}) and [`READ COMMITTED`]({% link {{ page.version.version }}/read-committed.md %}) transactions both serve globally consistent ("non-stale") reads and [commit atomically]({% link {{ page.version.version }}/developer-basics.md %}#how-transactions-work-in-cockroachdb) regardless of clock skew, skew outside the configured clock offset bounds can result in violations of single-key linearizability between causally dependent transactions. It's therefore important to prevent clocks from drifting too far by running [NTP](http://www.ntp.org/) or other clock synchronization software on each node.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is hard to follow. I know that you are just adding a link here, but I wonder if it could be re-ordered so that the sense of the last sentence goes first, or simplified somehow. I was lost by the time I got to "linearizability" and I'm not convinced this is a word (neither is Chrome spell check).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed I think!

src/current/v24.1/frequently-asked-questions.md Outdated Show resolved Hide resolved
src/current/v24.1/frequently-asked-questions.md Outdated Show resolved Hide resolved
src/current/v24.1/frequently-asked-questions.md Outdated Show resolved Hide resolved
src/current/v24.1/migrate-from-oracle.md Outdated Show resolved Hide resolved
src/current/v24.1/performance-recipes.md Show resolved Hide resolved
@taroface taroface enabled auto-merge (squash) May 14, 2024 15:00
@taroface taroface merged commit e255837 into main May 14, 2024
6 checks passed
@taroface taroface deleted the read-committed-24.1 branch May 14, 2024 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants