Adds support for Foreign keys table in Pstress#101
Merged
Conversation
eccd4f8 to
ec40d4e
Compare
inikep
approved these changes
Jul 23, 2025
Contributor
inikep
left a comment
There was a problem hiding this comment.
I'm not an expert in pstress but didn't found anything suspicious
https://perconadev.atlassian.net/browse/PSTRESS-152 Introduced support for Foreign key tables in Pstress. * The tables with foreign key references are suffixed with `_fk` while creating the tables. * These FK tables include `ifk_col` column referencing parent table's `ipkey`. * Example : When --fk-prob is 50 --tables 100 options are passed, there is a 50% chance there will be a table tt_N_fk whose parent would be tt_N. * To fully test FK behaviour, use `--fk-prob=100 --pk-prob=100` * The FK tables can be disabled with `--no-fk` option. Fixed transaction behaviour: * Ensured `START TRANSACTION` doesn't block other sessions by running transactions independently. Adjusted the default probabilities of some features: * A new option called partition-prob is added which controls the number of partition tables created and is set to 10% by default. * The exisiting option ratio-normal-temp is replaced with a new option, temporary-prob to control the number of temporary tables and is set to 10% by default. * The exisiting option commit-rollback-ratio is replaced with a new option, commit-prob, which controls the probability of executing commit and is set to 95 by default. * Decreased the probability of using SAVEPOINT in a transaction from 50% to 10%. * The option `primary-key-probability` is renamed to `--pk-prob` fpr clarity. Thanks Rahul Malik for the contribution. (github.com/Percona-QA/pull/92)
839adcd to
fe48d0f
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://perconadev.atlassian.net/browse/PSTRESS-152
Introduced support for Foreign key tables in Pstress.
_fkwhilecreating the tables.
ifk_colcolumn referencing parent table'sipkey.is a 50% chance there will be a table tt_N_fk whose parent would be
tt_N.
--fk-prob=100 --pk-prob=100--no-fkoption.Fixed transaction behaviour:
START TRANSACTIONdoesn't block other sessions by runningtransactions independently.
Adjusted the default probabilities of some features:
of partition tables created and is set to 10% by default.
temporary-prob to control the number of temporary tables and is set to
10% by default.
commit-prob, which controls the probability of executing commit and is
set to 95 by default.
to 10%.
primary-key-probabilityis renamed to--pk-probfpr clarity.Thanks Rahul Malik for the contribution.
(github.com/#92)