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

[YSQL] Extend existing unit tests to run for READ COMMITTED isolation level #18462

Closed
1 task done
sushantrmishra opened this issue Jul 28, 2023 · 2 comments
Closed
1 task done
Assignees
Labels
area/ysql Yugabyte SQL (YSQL) kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue

Comments

@sushantrmishra
Copy link

sushantrmishra commented Jul 28, 2023

Jira Link: DB-7436

Description

We should extend the unit test coverage for Read committed isolation level and add more test as required.

Also specifically consider following scenarios.

  • Table with primary key
  • Table with check constraints (covered by #15196)
  • Table with unique and non unique Index
  • Aggregate functions
  • Enable Colocation for the tables

Warning: Please confirm that this issue does not contain any sensitive information

  • I confirm this issue does not contain any sensitive information.
@sushantrmishra sushantrmishra added area/ysql Yugabyte SQL (YSQL) status/awaiting-triage Issue awaiting triage labels Jul 28, 2023
@yugabyte-ci yugabyte-ci added kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue and removed status/awaiting-triage Issue awaiting triage labels Jul 28, 2023
@sushantrmishra sushantrmishra changed the title [YSQL] Add unit test for Read Committed isolation level [YSQL] Extend existing unit tests to run for READ COMMITTED isolation level Aug 25, 2023
@robertsami
Copy link
Contributor

blocked on #18761

@robertsami robertsami assigned pkj415 and tvesely and unassigned tvesely and pkj415 Oct 18, 2023
mahak pushed a commit to mahak/yugabyte-db that referenced this issue Nov 19, 2023
…debug builds

Summary:
As an intermediary step in enabling READ COMMITTED by default, we should
be testing READ COMMITTED in debug builds.

As part of this work I removed tests for setting a transaction to READ
ONLY via pg_hint_plan in `PgMiniTest.FollowerReads` and
`PgMiniTest.MultiColFollowerReads`. We should not be using pg_hint_plan
to set `transaction_read_only`, and it only works because of a Postgres
bug.

Some tests were originally designed to run in REPEATABLE READ. These tests
have either been modified to explicitly run in REPEATABLE READ, or have been
rewritten to tolerate both isolation levels.

There are some tests that don't work well with RC isolation at the moment,
due to issues concerning DDL statements (yugabyte#19975) or due to poor buffering
of operations in the query layer for RC (yugabyte#18566). The gflag to enable RC has
been explicitly set to false in these tests.
Jira: DB-7436

Test Plan:
### Removed `pg_hint_plan` tests

./yb_build.sh --cxx-test pgwrapper_pg_mini-test --gtest_filter PgMiniTest.FollowerReads
./yb_build.sh --cxx-test pgwrapper_pg_mini-test --gtest_filter PgMiniTest.MultiColFollowerReads

### Tests modified to tolerate READ COMMITTED

./yb_build.sh --cxx-test pg_txn-test --gtest_filter PgTxnTest.ShowEffectiveYBIsolationLevel
./yb_build.sh --cxx-test pgwrapper_pg_catalog_perf-test --gtest_filter PgCatalogPerfTest.RPCCountAfterConflictError
./yb_build.sh --cxx-test pgwrapper_pg_libpq-test --gtest_filter PgLibPqTest.TxnConflictsForTablegroupsOrdered
./yb_build.sh --cxx-test pgwrapper_pg_fkey-test --gtest_filter 'PgFKeyTest/PgFKeyTestConcurrentModification.*'
./yb_build.sh --cxx-test pgwrapper_pg_on_conflict-test --gtest_filter PgOnConflictTest.ValidSessionAfterTxnCommitConflict
./yb_build.sh --cxx-test pgwrapper_pg_wrapper-test --gtest_filter PgWrapperTest.TestCompactHistoryWithTxn
./yb_build.sh --java-test 'org.yb.pgsql.TestPgRegressAuthorization#testPgRegressAuthorization' # [yb_pg_rowsecurity]
./yb_build.sh --java-test 'org.yb.pgsql.TestPgRegressCursor#testPgRegressCursor' # [yb_pg_portals]
./yb_build.sh --java-test 'org.yb.pgsql.TestPgRegressProc#testPgRegressProc' # [yb_get_current_transaction_priority]
./yb_build.sh --java-test 'org.yb.pgsql.TestPgRegressMisc#testPgRegressMiscSerial' # [yb_guc]

### Disabled READ COMMITTED

#### Issue yugabyte#18566

./yb_build.sh --cxx-test pgwrapper_pg_op_buffering-test --gtest_filter PgOpBufferingTest.PKConstraintConflict
./yb_build.sh --cxx-test pgwrapper_pg_op_buffering-test --gtest_filter PgOpBufferingTest.MaxBatchSize
./yb_build.sh --cxx-test pgwrapper_pg_op_buffering-test --gtest_filter PgOpBufferingTest.GeneralOptimization
./yb_build.sh --cxx-test pgwrapper_pg_op_buffering-test --gtest_filter PgOpBufferingTest.ConflictingOps

#### Issue yugabyte#19975

./yb_build.sh --cxx-test pgwrapper_pg_index_backfill-test --gtest_filter PgIndexBackfillTest.CreateIndexSimultaneously
./yb_build.sh --cxx-test pgwrapper_pg_catalog_version-test --gtest_filter PgCatalogVersionTest.FixCatalogVersionTable
./yb_build.sh --cxx-test pgwrapper_pg_catalog_version-test --gtest_filter PgCatalogVersionTest.DBCatalogVersionGlobalDDL
./yb_build.sh --cxx-test pg_packed_row-test --gtest_filter PackingVersion/PgPackedRowTest.AlterTable/*
./yb_build.sh --cxx-test pgwrapper_pg_libpq-test --gtest_filter PgLibPqTest.ConcurrentInsertTruncateForeignKey
./yb_build.sh --cxx-test pg_ddl_concurrency-test --gtest_filter PgDDLConcurrencyTest.IndexCreation
./yb_build.sh --cxx-test pg_ddl_atomicity-test --gtest_filter PgDdlAtomicityParallelDdlTest.TestParallelDdl
./yb_build.sh --cxx-test pg_ddl_atomicity-test
./yb_build.sh --cxx-test tools_yb-backup-test --gtest_filter YBBackupTest.TestYSQLRestoreBackupToDBCatalogVersionMode

Reviewers: pjain

Reviewed By: pjain

Subscribers: ybase, jason, yql, smishra

Differential Revision: https://phorge.dev.yugabyte.com/D27788
@pkj415
Copy link
Contributor

pkj415 commented Nov 22, 2023

Closing this gh issue since existing unit tests cover this for RC after b486165

@pkj415 pkj415 closed this as completed Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ysql Yugabyte SQL (YSQL) kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue
Projects
Status: Done
Development

No branches or pull requests

5 participants