114 Commits

Author SHA1 Message Date
Xiaoge Su
3e3eee98fc fixup! Reformat source 2024-06-17 11:41:06 -07:00
Xiaoge Su
afc04366fb Rewrite BUGGIFY related code
This is a rewrite of BUGGIFY function/macros. Seems the performance
improved a lot during the simulation, e.g.

fdbserver -r simulation -b on -f ../CycleTest.toml -s 99438

Without this patch:

Unseed: 54646
Elapsed: 494.091327 simsec, 14.586831 real seconds

With this patch:

Unseed: 54646
Elapsed: 494.091327 simsec, 12.580612 real seconds

I expected the improvement but did not expect a ~13% improvement.
2024-06-17 11:41:06 -07:00
Dimitris Apostolou
a88114c222
Fix typos 2024-02-07 01:16:00 +02:00
Jingyu Zhou
43d67d6f98 Should repeat when speedUpSimulation is false 2023-05-30 11:08:48 -07:00
Jingyu Zhou
0674984ab1 Fix a simulation DR stuck issue
When buggify is enabled, it's possible the version map has 5 entries, which is
larger than BACKUP_MAP_KEY_LOWER_LIMIT, causing the range task to be delayed
infinitely: the BackupRangeTaskFunc::_execute() skips the execution and
schedules the task to be added back in BackupRangeTaskFunc::_finish().

Reproduction:
  Seed: -f ./tests/slow/SharedDefaultBackupCorrectness.toml -s 3202874095 -b on
        -f ./tests/slow/VersionStampBackupToDB.toml -s 1190111003 -b on
  Commit: 6e5773dd5 at release-7.3
  Build: clang
2023-05-30 09:50:24 -07:00
Steve Atherton
53ee26d758 Changed KeyBackedTypes to an actor file. Added TypedKeySelectors for Map and Set classes and getRange() keySelector methods. Added debug macro for KeyBackedTypes. Rewrote KeyBackedRangeMap using keyselectors on KeyBackedMap. 2023-04-18 22:21:19 -07:00
A.J. Beamon
111bf9e34d Add macros for literal string ref versions of __FUNCTION__ and __FILE__ 2022-09-30 16:05:47 -07:00
A.J. Beamon
3353103d9d Fix filtering of potential backup mutations in commit proxy and backup worker; add code probe to ensure we are testing default backup sharing and add some tests to hit it 2022-09-27 15:25:30 -07:00
A.J. Beamon
a7c200b16c Add support for sharing mutation streams between a default backup and DR 2022-09-22 11:36:46 -07:00
A.J. Beamon
3e2684c974 Move option setting to the top of a database agent transaction 2022-09-22 10:00:13 -07:00
A.J. Beamon
fda0d7223d Update backup to include system key ranges needed for tenants. Run simulated backup tests with tenants. 2022-09-22 10:00:13 -07:00
A.J. Beamon
4fd64630e8 Convert literal string ref instances to use _sr suffix 2022-09-19 11:35:58 -07:00
Markus Pilman
1de37afd52
Make TEST macros C++ only (#7558)
* proof of concept

* use code-probe instead of test

* code probe working on gcc

* code probe implemented

* renamed TestProbe to CodeProbe

* fixed refactoring typo

* support filtered output

* print probes at end of simulation

* fix missed probes print

* fix deduplication

* Fix refactoring issues

* revert bad refactor

* make sure file paths are relative

* fix more wrong refactor changes
2022-07-19 13:15:51 -07:00
Markus Pilman
ffaf15c12a moved wellknownendpoints and fixed some includes 2022-06-23 17:03:53 -06:00
sfc-gh-tclinkenbeard
a71099471b Update copyright header dates 2022-03-21 13:36:23 -07:00
sfc-gh-tclinkenbeard
66d71e107d Move actorcompiler.h include to the end of includes 2022-03-16 00:09:16 -07:00
A.J. Beamon
250a88e682 Enforce that trace event suppression calls happen first when using trace event call chaining. Fix various instances where we weren't following this requirement. 2022-02-24 12:25:52 -08:00
leonliao
bc2c3df61f #6231 Fix wrong json path to check DB lock status while switching over dr clusters. 2022-01-24 13:37:09 -08:00
A.J. Beamon
d8e161f89e Refactor NativeAPI transactions to create and pass around a reference counted state object. Watches no longer use the tranasction info object but instead use their own state. 2021-12-17 11:57:39 -08:00
FDB Formatster
2c788c233d apply clang-format to *.c, *.cpp, *.h, *.hpp files 2021-08-27 17:07:47 -07:00
Steve Atherton
2bf7b9b7a9 Remove many calls to .toString(), .printable(), and printable(...) from TraceEvent .detail() values to avoid double-escaping characters such that the same values look different in different events and can't be easily searched for. Also fixed a few warnings found by clang. 2021-08-08 00:04:54 -07:00
sfc-gh-tclinkenbeard
c74047c665 Merge remote-tracking branch 'origin/master' into fix-more-clang-warnings 2021-07-28 11:51:02 -07:00
Steve Atherton
507c1f11e3 Add .log() to bare TraceEvent() invocations without any .detail()s to avoid clang-tidy warning about immediate destruction of object without use. 2021-07-26 19:55:10 -07:00
sfc-gh-tclinkenbeard
3442ebd3b7 Fix more -Wreorder-ctor warnings across many files 2021-07-24 11:20:51 -07:00
Steve Atherton
f596a81073 Rename ::TRUE and ::FALSE in BooleanParams to ::True and ::False so as to not conflict with the TRUE and FALSE macros provided by the Windows and MacOS SDKs. 2021-07-17 00:11:40 -07:00
Oleg Samarin
47f13ad1b0 Formatting status if the log version has not been set
Update fdbclient/DatabaseBackupAgent.actor.cpp

Co-authored-by: Trevor Clinkenbeard <trevor.clinkenbeard@snowflake.com>
Provide log version information to fdbdr status
2021-07-10 20:54:10 +03:00
sfc-gh-tclinkenbeard
8370d92c20 Expand use of BOOLEAN_PARAM in backup code 2021-07-04 18:30:55 -07:00
sfc-gh-tclinkenbeard
cadfdc551e Use BOOLEAN_PARAM for backup agents 2021-07-04 16:27:26 -07:00
sfc-gh-tclinkenbeard
49c680b252 Use BOOLEAN_PARAM for TaskBucket 2021-07-04 13:14:25 -07:00
sfc-gh-tclinkenbeard
8cc40e3a2b Expand use of BOOLEAN_PARAM 2021-07-02 21:41:50 -07:00
sfc-gh-tclinkenbeard
5c2d7b6080 Create RangeResult type alias 2021-05-03 13:14:16 -07:00
Lukas Joswiak
66d88e5f12
Merge branch 'master' into fixes/backup-delete 2021-04-20 14:49:26 -07:00
Lukas Joswiak
8b2a72fea2 Add option to clear destination range before backup 2021-04-20 12:24:17 -07:00
Lukas Joswiak
5d0d837268 Fix version cutoff 2021-04-20 09:35:40 -07:00
FDB Formatster
df90cc89de apply clang-format to *.c, *.cpp, *.h, *.hpp files 2021-03-10 10:18:07 -08:00
Andrew Noyes
cec050a1f8 Apply clang-tidy's modernize-use-override fix 2021-01-26 02:04:12 +00:00
sfc-gh-tclinkenbeard
4669f837fa Add uses of makeReference 2020-11-07 22:10:18 -08:00
sfc-gh-tclinkenbeard
035708f43a Post-merge cleanup 2020-10-29 22:35:27 -07:00
sfc-gh-tclinkenbeard
cf4c8e375f Merge remote-tracking branch 'origin/release-6.3' into merge 2020-10-29 22:15:41 -07:00
Jingyu Zhou
e183a10c8c Add "waitForDestUID" flag for abortBackup 2020-10-20 22:55:31 -07:00
Jingyu Zhou
47a9bc9d3d Fix commit_unknown_result issue 2020-10-18 23:11:19 -07:00
Jingyu Zhou
bfd3328448 Fix a race between submit and abort backup
After submit a backup, immediately abort the backup may cause a rare race
condition, which results in BackupCorrectnessLeftoverVersionKey error.

Specifically, in the StartFullBackupTaskFunc:
1st Txn sets the destUid at the source database and the 2nd Txn writes the dest
DB.

An abort can come after the 1st Txn succeeds, and clears the config rage so
that the 2nd Txn above would fail. Because 2nd Txn didn't write destUid, the
3rd Txn of abort can't read the correct source DB for latestVersionKey, which
contains the destUid value.

The fix is to let the 1st Txn of abort to wait until destUid becomes valid.
2020-10-18 23:11:15 -07:00
sfc-gh-tclinkenbeard
8ae0679112 Remove unnecessary separation of declaration and definition of version field 2020-10-04 23:27:05 -07:00
sfc-gh-tclinkenbeard
d13a9d3c91 Make EBackupState an enum class 2020-09-23 15:14:09 -07:00
Jingyu Zhou
90654628fb
Merge pull request #3490 from apple/release-6.3
Merge Release 6.3
2020-07-10 12:54:37 -07:00
Oleg Samarin
4c9df78076 dstonly 2020-07-10 15:13:42 +03:00
Oleg Samarin
6d70887d68
Update fdbclient/DatabaseBackupAgent.actor.cpp
Speed up sync between Primary and DR: Event Name Correction

Co-authored-by: Jingyu Zhou <jingyuzhou@gmail.com>
2020-07-04 21:37:28 +03:00
Oleg Samarin
6c23901e61 Speed up sync between Primary and DR 2020-07-03 11:38:54 +03:00
Oleg Samarin
1832b88e3f Removed debug messages 2020-06-26 13:34:52 +03:00
Oleg Samarin
d887d5dd70 Increased CopyLogRange performance 2020-06-26 13:34:35 +03:00