-
Notifications
You must be signed in to change notification settings - Fork 459
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
Technical Advisory 104309 #18309
Technical Advisory 104309 #18309
Conversation
Files changed: |
✅ Deploy Preview for cockroachdb-api-docs canceled.
|
✅ Deploy Preview for cockroachdb-interactivetutorials-docs canceled.
|
✅ Netlify Preview
To edit notification comments on pull requests, go to your Netlify site configuration. |
557e53c
to
eb0b414
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Let me just doublecheck something about crdb_internal_mvcc_timestamp
and logical timestamp components here.
Nick approved offline. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per discussion in slack, LGTM
bf5c75e
to
090b287
Compare
src/current/advisories/a104309.md
Outdated
|
||
## Description | ||
|
||
A [rangefeed](https://www.cockroachlabs.com/docs/stable/create-and-configure-changefeeds#enable-rangefeeds) bug may cause a [checkpoint](https://www.cockroachlabs.com/docs/stable/how-does-an-enterprise-changefeed-work) to be emitted prematurely in rare cases, before all writes below the checkpoint timestamp have been emitted. This could occur if nodes are overloaded or if long-running transactions (several seconds) are involved, such that intent resolution only replicates to a follower running a rangefeed more than 10 seconds after the transaction began. If a cluster using changefeeds experiences this bug, changefeeds will omit these write events, and the following error will be logged: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should link the expression, "write intent" to some reference reading. I think this is probably the best spot. https://www.cockroachlabs.com/docs/v23.2/architecture/transaction-layer#write-intents
090b287
to
4206971
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've suggested a few changes. Feel free to push back if they don't make sense given your additional context.
|
||
The specific conditions to trigger the bug are: | ||
|
||
1. An explicit or cross-range transaction commits, then asynchronously resolves all of its intents and removes its transaction record on all relevant leaseholders. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explicit OR cross-range transactions is a strange subset of all transactions. Is it explicit AND cross-range?
Also, aren't all write intents removed async after the transaction commits during the cleanup stage? The language here just doesn't make sense to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way this is written reads (to me) as if this behavior is unusual.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be worth clarifying. The intention here is "All explicit transactions and cross-range implicit transactions are affected."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason is that single-range implicit transactions don't write intents.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shralex Is the suggested edit accurate? https://github.com/cockroachdb/docs/pull/18309/files#r1496690828 (sorry about the HTML, it's a tooling edge case)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, LGTM!
|
||
The specific conditions to trigger the bug are: | ||
|
||
1. An explicit or cross-range transaction commits, then asynchronously resolves all of its intents and removes its transaction record on all relevant leaseholders. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. An explicit or cross-range transaction commits, then asynchronously resolves all of its intents and removes its transaction record on all relevant leaseholders. | |
1. A transaction commits, then asynchronously resolves all of its intents and removes its transaction record on all relevant leaseholders. To be affected by the bug, the transaction must be either an <a href="https://www.cockroachlabs.com/docs/stable/transactions#sql-statements">explicit transaction</a> with `BEGIN` and a `COMMIT` clauses, or an implicit transaction (single-statement write) that involves multiple ranges. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shannonbradshaw Is this more clear?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM including suggestions, thanks!
Technical Advisory 104309
Preview: src/current/advisories/a104309.md