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

#9: port db stress changes from speedb to the oss version #10

Merged

Conversation

isaac-io
Copy link
Contributor

Fixes #9

@isaac-io isaac-io linked an issue Jun 14, 2022 that may be closed by this pull request
@isaac-io isaac-io self-assigned this Jun 14, 2022
@isaac-io isaac-io requested a review from Yuval-Ariel June 14, 2022 11:32
@Yuval-Ariel Yuval-Ariel requested a review from VodOleg June 20, 2022 11:41
@isaac-io isaac-io force-pushed the 9-port-db_stress-changes-from-speedb-to-the-oss-version branch from 979ef96 to 7450e67 Compare June 20, 2022 11:55
@Yuval-Ariel Yuval-Ariel assigned Yuval-Ariel and unassigned isaac-io Jun 22, 2022
@Yuval-Ariel Yuval-Ariel force-pushed the 9-port-db_stress-changes-from-speedb-to-the-oss-version branch 3 times, most recently from 32ee3d0 to bb4174a Compare June 25, 2022 18:05
@Yuval-Ariel Yuval-Ariel force-pushed the 9-port-db_stress-changes-from-speedb-to-the-oss-version branch from bb4174a to 8c85231 Compare June 27, 2022 06:07
isaac-io and others added 13 commits June 27, 2022 09:13
This helps debug things by correlating with other events in the system,
which we are unable to connect currently due to lack of information on
which process failed and when.
SPDB-225 added copying of the database during tests in order to preserve
the state of the database, but after a successful run there's no reason
to keep these copies around, so remove them.
The command is printed anyway by execute_cmd(), so there's no need to
print it in whitebox_crash_main() as well.
The current code is broken, because it effectively sets bool() as the
conversion function for boolean arguments, but bool() returns True for
every non-empty string, so that doesn't work.

Add a converter function to parse boolean value and set it as the type
for argparse in case the argument is of type bool.
…snapshot

In batched snapshot mode each key is duplicated 10 times and prefixed with
an ASCII digit in the range 0-9. However, the snapshot verification code
assumed that each key is present exactly as generated and exactly once,
so the calculated key index was bogus and lead to an invalid memory access.

Fix it by making the snapshot verification code aware of the batched mode
and apply the key conversion and verification accordingly.

While at it, clean up the way the verification bit vector is allocated.
db_stress does not support running successive runs with
different values of test_batches_snapshots.
in addition, add randomize_operation_type_percentages
This changes the way the stress test parameters are generated in order to
increase the coverage of the test and check for more edge cases.

Additionally, this change adds the option to run whitebox tests with kill
points disabled for testing functionality without crash recovery.

SPDB-390: crash_test: fix bool flags

SPDB-388: crash_test: disallow zero key dist val

zero vals in key_len_percent_dist are incompatible with
db_stress_common.h::GetIntVal
…ncy is on

running with both options, the stress test chosen is cf_consistency_stress
which does not use '0' - '9' as prefix for keys as in batched_ops_stress.
when doing compare_full_db_state_snapshot, the code expects each key to
have the prefix since test_batches_snapshots==true.
there is no point when both flags are on since each is run as a different stress test.
user can now switch between kDataBlockBinarySearch and
kDataBlockBinaryAndHash
also fix handling of customopspercent which atm is only applicable to
test_multiops_txn by making sure its 0 in all the other configs.
@Yuval-Ariel Yuval-Ariel force-pushed the 9-port-db_stress-changes-from-speedb-to-the-oss-version branch from 8c85231 to 7aca1b2 Compare June 27, 2022 06:13
@Yuval-Ariel Yuval-Ariel requested a review from VodOleg June 27, 2022 06:15
@Yuval-Ariel
Copy link
Contributor

passed QA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port db_stress changes from Speedb to the OSS version
3 participants