-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[YSQL][#2523] Fix read point for row lock stmt
Summary: * Set read times when row mark is set Read times are left invalid when row marks are set. They should be set to have snapshot isolation reads happen at the transaction start time and for conflict detection to also use the transaction start time. Modify logic to set and pass the read times. * Detect intent conflicts with empty prefix The intent and regular records conflict detection in `ProcessIntent` does not handle cases when the intent key prefix is empty (signifying full table). Handle this extra case crudely by comparing the key prefix with `ValueTypeAsChar::kGroupEnd`. * Add new test for row lock statements Add test methods `PgMiniTest::TestInsertSelectRowLock`, `PgMiniTest::TestDeleteSelectRowLock`, and Gtests * `PgMiniTest.SerializableDeleteForKeyShare` * `PgMiniTest.SerializableDeleteForShare` * `PgMiniTest.SerializableInsertForKeyShare` * `PgMiniTest.SerializableInsertForShare` * `PgMiniTest.SnapshotDeleteForKeyShare` * `PgMiniTest.SnapshotDeleteForShare` * `PgMiniTest.SnapshotInsertForKeyShare` * `PgMiniTest.SnapshotInsertForShare` that call that test method with different arguments. Test Plan: * #2523 * Jenkins * `./yb_build.sh` * `--cxx-test pgwrapper_pg_mini-test --gtest_filter PgMiniTest.SerializableDeleteForKeyShare` * `--cxx-test pgwrapper_pg_mini-test --gtest_filter PgMiniTest.SerializableDeleteForShare` * `--cxx-test pgwrapper_pg_mini-test --gtest_filter PgMiniTest.SerializableInsertForKeyShare` * `--cxx-test pgwrapper_pg_mini-test --gtest_filter PgMiniTest.SerializableInsertForShare` * `--cxx-test pgwrapper_pg_mini-test --gtest_filter PgMiniTest.SnapshotDeleteForKeyShare` * `--cxx-test pgwrapper_pg_mini-test --gtest_filter PgMiniTest.SnapshotDeleteForShare` * `--cxx-test pgwrapper_pg_mini-test --gtest_filter PgMiniTest.SnapshotInsertForKeyShare` * `--cxx-test pgwrapper_pg_mini-test --gtest_filter PgMiniTest.SnapshotInsertForShare` * `--java-test org.yb.pgsql.TestPgForeignKey` Reviewers: mikhail Reviewed By: mikhail Subscribers: yql, bogdan Differential Revision: https://phabricator.dev.yugabyte.com/D7488
- Loading branch information
Jason Kim
committed
Nov 6, 2019
1 parent
84abad3
commit 073b342
Showing
4 changed files
with
128 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters