-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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: fix cluster_logical_timestamp() #41438
kv: fix cluster_logical_timestamp() #41438
Conversation
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.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @andreimatei and @nvanbenschoten)
pkg/kv/txn_test.go, line 634 at r1 (raw file):
commitTS := txn.CommitTimestamp() // We expect to have refreshed just after the timestamp injected by the error. expTS := refreshTS.Add(0, 1)
The race detector is ok with this, right?
Before this patch, the txn.CommitTimestamp() function (which powers the cluster_logical_timestamp(), among others) was failing to take into consideration possible refreshes that might have happened since the current epoch began (i.e. txn.RefreshedTimestamp). Fixes cockroachdb#41424 Release note (bug fix): Fix a bug causing the cluster_logical_timestamp() function to sometimes return incorrect results.
f899de6
to
b491dde
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.
bors r+
Reviewable status: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @andreimatei)
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.
Reviewable status: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @nvanbenschoten)
pkg/kv/txn_test.go, line 634 at r1 (raw file):
Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
The race detector is ok with this, right?
yup
Build failed (retrying...) |
41323: sql: bevy of fixes for ActiveRecord compatibility r=jordanlewis a=jordanlewis - improve efficiency of `'foo'::REGCLASS` - improve efficiency of `pg_get_coldesc` - parse INTERVAL(6) as a no-op meaning INTERVAL - bugfix to generate_subscripts for oidvector and int2vector - add pg_available_extensions - fix `pg_get_indexdef` and `pg_attrdef.adbin` to be more Postgres compatible With these fixes, 90% of the fork in `activerecord-cockroachdb-adapter` can go away. 41438: kv: fix cluster_logical_timestamp() r=andreimatei a=andreimatei Before this patch, the txn.CommitTimestamp() function (which powers the cluster_logical_timestamp(), among others) was failing to take into consideration possible refreshes that might have happened since the current epoch began (i.e. txn.RefreshedTimestamp). Fixes #41424 Release note (bug fix): Fix a bug causing the cluster_logical_timestamp() function to sometimes return incorrect results. Co-authored-by: Jordan Lewis <jordanthelewis@gmail.com> Co-authored-by: Andrei Matei <andrei@cockroachlabs.com>
Build succeeded |
41439: release-19.2: kv: fix cluster_logical_timestamp() r=andreimatei a=andreimatei Backport 1/1 commits from #41438. /cc @cockroachdb/release --- Before this patch, the txn.CommitTimestamp() function (which powers the cluster_logical_timestamp(), among others) was failing to take into consideration possible refreshes that might have happened since the current epoch began (i.e. txn.RefreshedTimestamp). Fixes #41424 Release note (bug fix): Fix a bug causing the cluster_logical_timestamp() function to sometimes return incorrect results. Co-authored-by: Andrei Matei <andrei@cockroachlabs.com>
41457: sql: (revert the reversion) fix various problematic uses of the txn in DistSQL flows r=andreimatei a=andreimatei This is a reversion of #41406, which was a reversion of #41304 #41304 had been revert because it exposed an existing bug more broadly. That bug was fixed by #41438. So here we go again with this patch. See individual commits for what the patch does. Co-authored-by: Andrei Matei <andrei@cockroachlabs.com>
41470: release-19.2: sql: (revert the reversion) fix various problematic uses of the txn in DistSQL flows r=andreimatei a=andreimatei Backport 4/4 commits from #41457. /cc @cockroachdb/release --- This is a reversion of #41406, which was a reversion of #41304 #41304 had been revert because it exposed an existing bug more broadly. That bug was fixed by #41438. So here we go again with this patch. See individual commits for what the patch does. Co-authored-by: Andrei Matei <andrei@cockroachlabs.com>
Before this patch, the txn.CommitTimestamp() function (which powers
the cluster_logical_timestamp(), among others) was failing to take into
consideration possible refreshes that might have happened since the
current epoch began (i.e. txn.RefreshedTimestamp).
Fixes #41424
Release note (bug fix): Fix a bug causing the
cluster_logical_timestamp() function to sometimes return incorrect
results.