-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…during multi-row insert Summary: Revert commits: beeebbe/D26549 7b582dd/D26561 That were preventing bloom filters from being used during multi-row insert. (Check for existing row and conflict resolution). Expected regression in PgSingleTServerTest.ScanWithPackedRow (also could happen in any other insert heavy test) Insert TServer time: master - 7.89s this diff - 13.99s Also fixed bug with missing conflict that was fixed by beeebbe/D26549. And added test for this bug - PgSingleTServerTest.RangeConflict. We did not recreate iterator when checking for overwritten value during conflict resolution with range only keys. So overwritten value could be filtered by bloom filter for previous checked entry. Fixed by adjusting check to recreate iterator. Also this diff fixes GH #20648, because this issue was introduced by beeebbe/D26549 that was reverted. Jira: DB-9391, DB-9644 Test Plan: Launched n2-standard-4 instance with RF1 cluster. And script to load 10M rows by chunks: ``` drop table if exists test_table; create extension if not exists pgcrypto; create table test_table(k text, v text, PRIMARY KEY(k ASC)); create index index_v_test_table on test_table(v); -- Load 10M rows do $$ begin for counter in 1..1000 loop raise notice 'counter: %', (counter * 10000); insert into test_table (select gen_random_uuid(), gen_random_bytes(50)::text from generate_series(1, 10000) i); commit; end loop; end $$; ``` Execution time: master (5923bb6) - 8m41s this diff - 6m57s 2.18.5 (ef3afb2) - 10m00s --- Also loaded 30M rows using a similar set of scripts at https://github.com/mbautin/ysql-bulk-load-test on a GCP VM with 7693 MiB of RAM, 4 vcpus (Xeon(R) CPU @ 2.80GHz) with a balanced persistent disk: https://gist.githubusercontent.com/mbautin/160fc5b72ec6aae476b02238529a170a/raw This diff results in a 3.8x speedup (1489.6 sec instead of 5689.3 sec) and a reduction in IO from 17600.9 to 11901.5 kb/sec disk read throughput (a factor of ~1.5) at the end of the load (it generally increases throughout the bulk load). Re-running the 30M row load test on 2.18.5.1 results on 1990.8 load time, confirming that the code before this diff (with the load time of 5689.3 sec) represents a signficant regression compared to that release. https://gist.githubusercontent.com/mbautin/84073c28fb2aa3ae92c2146eda55e4cc/raw Original commit: 78efbc0/D31635 Reviewers: mbautin, timur Reviewed By: mbautin Subscribers: kannan, ybase, yql, bogdan Tags: #jenkins-ready Differential Revision: https://phorge.dev.yugabyte.com/D31809
- Loading branch information
Showing
14 changed files
with
71 additions
and
138 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
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
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
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
Oops, something went wrong.