Skip to content

spanconfig/sqlwatcher: use the right mvcc timestamp#73439

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
irfansharif:211203.sqlwatcher-ts
Dec 6, 2021
Merged

spanconfig/sqlwatcher: use the right mvcc timestamp#73439
craig[bot] merged 1 commit intocockroachdb:masterfrom
irfansharif:211203.sqlwatcher-ts

Conversation

@irfansharif
Copy link
Copy Markdown
Contributor

When unmarshaling descriptor protos into their specific types, we want
to pass in the MVCC timestamp at which that descriptor was read. Given
we receive these protos through the surrounding rangefeed, we want to
use the rangefeed event timestamp. We we erroneously using the timestamp
found on the rangefeed event's "previous value", which the API
guarantees will be the zero timestamp.

(This tripped us up before; we added some commentary + tests in #71225
for the rangefeed library to make this clearer.)

Release note: None

When unmarshaling descriptor protos into their specific types, we want
to pass in the MVCC timestamp at which that descriptor was read. Given
we receive these protos through the surrounding rangefeed, we want to
use the rangefeed event timestamp. We we erroneously using the timestamp
found on the rangefeed event's "previous value", which the API
guarantees will be the zero timestamp.

(This tripped us up before; we added some commentary + tests in cockroachdb#71225
for the rangefeed library to make this clearer.)

Release note: None
@irfansharif irfansharif requested a review from a team as a code owner December 3, 2021 16:15
@irfansharif irfansharif requested a review from nvb December 3, 2021 16:15
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@irfansharif
Copy link
Copy Markdown
Contributor Author

Verified the fix with just make testlogic FILES='auto_span_config_reconciliation_job' when rebased on top of #71994. We hit this fatal pretty readily once the reconciler's actually running.

@irfansharif
Copy link
Copy Markdown
Contributor Author

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Dec 6, 2021

Build succeeded:

@craig craig bot merged commit a51c327 into cockroachdb:master Dec 6, 2021
@irfansharif irfansharif deleted the 211203.sqlwatcher-ts branch December 6, 2021 15:12
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.

3 participants