diff options
author | Luke Chen <luke.chen@mongodb.com> | 2021-07-21 16:05:14 +1000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-07-21 06:24:58 +0000 |
commit | 03c49a3d3b228c68a2a369bd7a4d8f5588c72d09 (patch) | |
tree | c7d75b8281aa0d2702ba4de99b8860bcaa1f823e /src/third_party/wiredtiger/test/csuite/incr_backup/main.c | |
parent | 744675fe9ca246317dc8d68aaeb2e9070c06989c (diff) | |
download | mongo-03c49a3d3b228c68a2a369bd7a4d8f5588c72d09.tar.gz |
Import wiredtiger: 2b73914cd8912fab0e01ebd67cd0106de45442cd from branch mongodb-4.4
ref: 5444fd4334..2b73914cd8
for: 4.4.8
WT-6280 Fail eviction if out of order handling races with checkpoint
WT-6729 Quiesce eviction prior running rollback to stable's active transaction check
WT-6782 test_prepare_hs02 WT_ROLLBACK failure: conflict between concurrent operations
WT-7231 Add CMake build and tests into Evergreen
WT-7279 Allow multiple terminate calls for storage source extension
WT-7317 Improve the runtime_monitor component to track history store cleanup statistics
WT-7338 Copy the configuration directory when building the test framework
WT-7343 Write a script that executes many-collection-test.py
WT-7383 Add framework for new hs_cleanup test and refactor workload generator and database operation
WT-7447 Fix the assert fire because onpage out of order update is not popped from the stack
WT-7473 Resolve "TODO: tiered" comments in code
WT-7507 Update salvage for a history store and timestamp world
WT-7520 Add start and stop values to automatic flag generation code
WT-7524 Refactor functions to obtain checkpoint list; Clear delete on skipping checkpoints
WT-7539 Add a configuration option that allows the user to specify debug modes.
WT-7543 Pass in the correct test name when constructing the default config path
WT-7552 Add UBSAN to automated WT testing
WT-7553 Loosen the restrictions around evicting fast-truncate pages to avoid cache-stuck failures
WT-7556 Fix test_rollback_to_stable10 failure cache_hs_ondisk is 0
WT-7583 Coverity analysis defect 114074: Logically dead code (rework)
WT-7585 Fix cyclomatic-complexity test failure
WT-7589 Fix reopening connection after a flush_tier in tiered tests
WT-7591 Fixes to allow cursors to be open during flush_tier
WT-7603 Sort statistics to fix JSON output
WT-7605 Drop support for million-collection-test
WT-7609 Report on time taken to start and shutdown the database in many-coll-test
WT-7616 Create a pass or fail test based on many collection workgen workload
WT-7619 Add a new optimization to skip pages in cursor traversal when all entries on the page are deleted
WT-7626 We only ensure update restore eviction happened in test debug mode09
WT-7628 Return an error message when supplied invalid command line args in the test framework
WT-7629 Run clang format on .cxx files in the codebase.
WT-7632 Fix invalid argument in test_rollback_to_stable14
WT-7636 Fix leaked cursors by implementing scoped cursor and session types
WT-7639 Alter test_tiered02.py to collect more data before asserting for missing file
WT-7640 Fix test_backup02 failure where checkpoint tables differ due to checkpoint cursor not supported
WT-7644 Implement python hooks for tiered storage
WT-7646 Remove unneeded uses of WT_WITH_BUCKET_STORAGE macro
WT-7647 Change Zstandard wrapper to include context management
WT-7648 Improve error messaging in the test framework
WT-7649 Skip timestamp assert during recovery
WT-7659 Disallow rename on tiered table
WT-7660 Rename poc_test to base_test in the cpp test framework and add insert_operation logic
WT-7665 Apply op tracking inserts in the workload transaction
WT-7666 Add assertion to check whether duplicate history store inserts are modifies
WT-7667 Fix workgen JSON output
WT-7668 Overload the update method for the hs_cleanup test
WT-7670 Modify test tag format and tag additional python tests
WT-7672 Remove make-check-test from Windows CMake Evergreen build variant
WT-7674 reduce rollback-to-stable work for fast-truncate pages
WT-7675 Query last ckpt timestamp changes without taking checkpoint
WT-7676 Reformat wtperf backup to only read in files instead of wt_copy_and_sync
WT-7679 Create an evergreen test for many-dhandle-stress
WT-7680 refactor rollback-to-stable to support operating on individual files
WT-7683 Add python test hook to call flush_tier() during connection.close()
WT-7685 Fix invalid values and units for latencies in workgen
WT-7686 Fix config call, allowing "sync" option to work for flush_tier
WT-7687 Stop tiered manager thread before internal thread
WT-7689 Fix double free in `__curhs_insert`
WT-7690 Fix coverity error when enum is compared against 0 (incr_backup:table_changes)
WT-7692 fix make check test failure on osx10 14 cmake
WT-7696 Fix coverity error - Unused variable in _rollback_to_stable_btree_apply_all
WT-7698 Decrease max_latency value in many dhandles scenario for workgen
WT-7699 Fix RTS handling to abort an out of order prepared transaction
WT-7705 Add an assert to ensure that there are no updates on the new disk image in update restore
WT-7706 Use same transaction update when on-disk value is an aborted prepared update
WT-7707 Simplify insert splits to use the splitting WT_REFs key
WT-7708 Add an assert to ensure the durable timestamp is larger than stable timestamp at the end of prepared commit
WT-7710 Fix to use history store btree to initialise history store cursor
WT-7715 Fix uninitialized bool in txn_ckpt.c
WT-7717 Change macros in local_store.c to use WT namespace
WT-7719 Change default value of ENABLE_STRICT to "OFF" (CMake Usability Improvements)
WT-7720 Update POSIX CMAKE doxygen documentation (CMake Usability Improvements)
WT-7721 Update test-format to reopen an existing database with different config
WT-7723 Delete the updates in the history store if they are rolled back or is the first stable update on the update chain
WT-7724 Fix race when running concurrent checkpoint and flush_tier
WT-7725 Add missing brackets around parameter in macro definition
WT-7726 Separating out the validation portion from the database model
WT-7727 Fix null pointer passed to memcpy() during 'format' test.
WT-7729 Fix to write out correct tiered information on checkpoint
WT-7730 Shifting the oldest and stable timestamps to match the commit timestamp format
WT-7739 Switch back to using MacOS 10.14 for Evergreen compile task
WT-7741 Fix misaligned address in crc32-x86.c
WT-7742 Fix misaligned address in wt3184_dup_index_collator/main.c
WT-7743 Fix integer overflow within wt2999_join_extractor csuite test
WT-7744 Fix null pointer within wt3338_partial_update csuite
WT-7746 Improve directory syncing with CMake helper 'create_test_executable'
WT-7748 Fix CMake library probes for libraries not on the default linker path
WT-7749 Assorted fixes for (and from) building and testing on NetBSD
WT-7751 Add an assert to ensure we never select an update that has been written to the history store for data store
WT-7752 Update packing code according to documentation
WT-7754 Fix race when updating block manager file handle
WT-7755 YSCB: Add a native implementation of YCSB to WTPERF.
WT-7756 RTS to clear the HS flag of an update following tombstone
WT-7760 Support array parsing in CppSuite config handling
WT-7761 Improve debug_print to include timestamp, thread_id and reorder args in cppsuite.
WT-7762 Create stressful configs for the two tests add them to evergreen.
WT-7763 Coverity issues found in the stress testing framework
WT-7765 Fix signed integer overflow in intpack-test3
WT-7766 Fix null pointer passed to memset in test_wt3338_partial_update
WT-7767 Code cleanup for curhs_remove and __txn_fixup_prepared_update
WT-7770 Fix issue linking TCMalloc in CMake
WT-7776 Add a hard limit on the number of modify updates before we instantiate a complete update
WT-7778 Fix null dereferencing, and return of incorrect allocation size
WT-7780 Guarantee log message sequencing in the test framework.
WT-7781 Avoid skipping python tests for 3rd party ext libraries in CMake builds
WT-7782 Separate implementation from headers in cppsuite test framework
WT-7783 Fix RTS to restore tombstone when an on-disk update is out of order prepare update
WT-7784 Enable RTS to use checkpoint snapshot on timestamp tables
WT-7795 Fix CppSuite failure "expected ) before PRIxMAX"
WT-7796 Scan the tracking table and delete parts of it that are obsolete.
WT-7797 Disable postrun stats in CppSuite testing
WT-7799 Do not report failure of wiredtiger_open in python tests to output
WT-7802 Remove data store same transaction update squash logic
WT-7804 Fix test_hs24 committing mixed mode update from the wrong value
WT-7807 Remove unused arg in backup_config
WT-7811 Fix test_hs24 not commiting from 0 timestamp
WT-7813 Stop inserting to history store if we see a prepared update
WT-7815 Properly initialize prev_upd_ts for ordered timestamp assertion
WT-7825 Fix test_hs24 key order
WT-7828 Move many-coll-test to ubuntu1804-wt-large and update thresholds accordingly
WT-7831 Clear transaction ids from previous run when repack the cell
WT-7832 Add an encryptor extension that uses the libsodium cryptography library.
WT-7836 Fixing a number of small issues in the cppsuite test framework
WT-7837 Clear updates structure in wt_hs_insert_updates to avoid firing assert
WT-7841 add "only unencrypted" checksum configuration, switch checksum default to "on"
WT-7843 Add missing macros to define PRIxMAX
WT-7846 Disable test_tiered08
WT-7851 Fix illegal checksum configuration in compatibility-test-for-newer-releases
WT-7852 Don't release eviction server lock when evicting pages
WT-7856 Enable flush test with open cursor in test_tiered04
Reverted ticket(s):
WT-7443 Add error message when bulk cursor can't get exclusive access to dhandle
Diffstat (limited to 'src/third_party/wiredtiger/test/csuite/incr_backup/main.c')
-rw-r--r-- | src/third_party/wiredtiger/test/csuite/incr_backup/main.c | 38 |
1 files changed, 31 insertions, 7 deletions
diff --git a/src/third_party/wiredtiger/test/csuite/incr_backup/main.c b/src/third_party/wiredtiger/test/csuite/incr_backup/main.c index b09e1b44da4..f8de2578e3d 100644 --- a/src/third_party/wiredtiger/test/csuite/incr_backup/main.c +++ b/src/third_party/wiredtiger/test/csuite/incr_backup/main.c @@ -110,7 +110,9 @@ extern int __wt_optind; extern char *__wt_optarg; /* - * The choices of operations we do to each table. + * The choices of operations we do to each table. Please do not initialize enum elements with custom + * values as there's an assumption that the first element has the default value of 0 and the last + * element is always reserved to check count on elements. */ typedef enum { INSERT, MODIFY, REMOVE, UPDATE, _OPERATION_TYPE_COUNT } OPERATION_TYPE; @@ -154,6 +156,20 @@ die(void) } /* + * Get operation type based on the number of changes + */ +static OPERATION_TYPE +get_operation_type(uint64_t change_count) +{ + int32_t op_type; + + op_type = ((change_count % CHANGES_PER_CYCLE) / KEYS_PER_TABLE); + testutil_assert(op_type <= _OPERATION_TYPE_COUNT); + + return (OPERATION_TYPE)op_type; +} + +/* * key_value -- * Return the key, value and operation type for a given change to a table. See "Cycle of changes * to a table" above. @@ -173,7 +189,7 @@ key_value(uint64_t change_count, char *key, size_t key_size, WT_ITEM *item, OPER char ch; key_num = change_count % KEYS_PER_TABLE; - *typep = op_type = (OPERATION_TYPE)((change_count % CHANGES_PER_CYCLE) / KEYS_PER_TABLE); + *typep = op_type = get_operation_type(change_count); testutil_check( __wt_snprintf(key, key_size, KEY_FORMAT, (int)(key_num % 100), (int)(key_num / 100))); @@ -370,7 +386,11 @@ table_changes(WT_SESSION *session, TABLE *table) item.size = table->max_value_size; key_value(change_count, key, sizeof(key), &item, &op_type); cur->set_key(cur, key); - testutil_assert(op_type < _OPERATION_TYPE_COUNT); + + /* + * To satisfy code analysis checks, we must handle all elements of the enum in the + * switch statement. + */ switch (op_type) { case INSERT: cur->set_value(cur, &item); @@ -393,7 +413,7 @@ table_changes(WT_SESSION *session, TABLE *table) testutil_check(cur->update(cur)); break; case _OPERATION_TYPE_COUNT: - break; + testutil_die(0, "Unexpected OPERATION_TYPE: _OPERATION_TYPE_COUNT"); } } free(value); @@ -682,11 +702,15 @@ check_table(WT_SESSION *session, TABLE *table) expect_records = 0; total_changes = table->change_count; boundary = total_changes % KEYS_PER_TABLE; - op_type = (OPERATION_TYPE)((total_changes % CHANGES_PER_CYCLE) / KEYS_PER_TABLE); + op_type = get_operation_type(total_changes); value = dcalloc(1, table->max_value_size); VERBOSE(3, "Checking: %s\n", table->name); - testutil_assert(op_type < _OPERATION_TYPE_COUNT); + + /* + * To satisfy code analysis checks, we must handle all elements of the enum in the switch + * statement. + */ switch (op_type) { case INSERT: expect_records = total_changes % KEYS_PER_TABLE; @@ -699,7 +723,7 @@ check_table(WT_SESSION *session, TABLE *table) expect_records = KEYS_PER_TABLE - (total_changes % KEYS_PER_TABLE); break; case _OPERATION_TYPE_COUNT: - break; + testutil_die(0, "Unexpected OPERATION_TYPE: _OPERATION_TYPE_COUNT"); } testutil_check(session->open_cursor(session, table->name, NULL, NULL, &cursor)); |