Commit Graph

59 Commits

Author SHA1 Message Date
negoyal f913dfed97 Merge branch 'master' into bit-flipping-workload 2021-10-11 16:34:57 -07:00
Steve Atherton 14efc4c251 Bug fix which only affects simulation: dataCopy was created after a potential wait so the source memory may have already been released. 2021-10-11 08:23:15 -06:00
Xiaoge Su abf73047ca Enforce std:: specifier rather than using namespace 2021-09-16 19:40:28 -07:00
negoyal 3b34423248 Merge branch 'master' into bit-flipping-workload 2021-08-31 12:14:51 -07:00
negoyal 4b87716475 Turn the chaos knob off by default. 2021-07-28 18:19:55 -07:00
negoyal 050c218502 New Disk Delay Logic and ChaosMetrics. 2021-07-28 16:03:37 -07:00
sfc-gh-tclinkenbeard 64dc1dc185 Fix -Wreorder-ctor warnings in NativeAPI.actor.cpp and several other files 2021-07-24 00:23:06 -07:00
sfc-gh-tclinkenbeard b9a22a61ef Fix many -Wreorder-ctor warnings 2021-07-23 17:33:18 -07:00
negoyal 1b8b22decc Wrapper class to avoid adding overhead to all async disk calls 2021-07-12 17:51:01 -07:00
negoyal 2b5a96f745 Single code path for sim and non-sim modes. 2021-07-07 23:58:14 -07:00
A.J. Beamon d82eac4062 Fix a test issue where closing an AsyncFileNonDurable could permanently prevent you from reopening the file if the machine was in a failed state during cleanup 2021-05-27 20:41:49 -07:00
A.J. Beamon 944a03d575 For files that use the atomic write and create mechanism, attempt to remove the file from the openFiles map at both its old and new name 2021-05-26 16:26:45 -07:00
A.J. Beamon a756469670 Use a weak reference in the open files cache (abstracted from a similar cache in AsyncFileCached) to avoid a problem where removing an item from the cache could cause us to reentrantly remove it again. 2021-05-26 13:38:24 -07:00
Markus Pilman cbce2f6f11 delete dead code 2021-05-26 11:12:07 -07:00
Markus Pilman 7b4de4e037 Revert change 2021-05-26 11:11:51 -07:00
Markus Pilman 7cb767fd3c only remove files from the open map if they have no modifications in flight 2021-05-26 11:11:44 -07:00
Markus Pilman 04613c3b13 handle file renames properly 2021-05-26 11:11:37 -07:00
Markus Pilman f32ce0c4b5 fix typo 2021-05-26 11:11:24 -07:00
Markus Pilman 6bd7fa4036 Actually close files in simulation 2021-05-26 11:11:12 -07:00
Andrew Noyes 6bffbdf7e3
Revert "Actually close files in simulation" 2021-05-04 15:38:24 -07:00
Jingyu Zhou 1c92588cca
Merge pull request #4562 from sfc-gh-mpilman/bugfixes/simulator-close-files
Actually close files in simulation
2021-05-03 13:47:44 -07:00
Evan Tschannen 65fcf4014e Fix: simulation could still stall writes for 10 seconds even when speedUpSimulation was on
Fix: disable connection failures in simulation when there are too many generations outstanding
2021-04-28 12:41:48 -07:00
Steve Atherton db610355cf Keep simulated disk write delay high until speedUp is set. 2021-04-16 14:19:37 -07:00
Steve Atherton 1958fde5c6 Added parentheses for clarity. 2021-04-13 20:49:04 -07:00
Steve Atherton f74748ebac Applied clang-format. 2021-04-13 20:43:12 -07:00
Steve Atherton 9475b6a5dd Correctness fix, prevent AsyncFileNonDurable from always making file writes take up to 5 seconds. 2021-04-13 20:15:19 -07:00
Markus Pilman 41d1aee609 delete dead code 2021-04-01 14:06:13 -06:00
Markus Pilman 1987682e1e Merge remote-tracking branch 'origin/master' into bugfixes/simulator-close-files 2021-04-01 11:14:28 -06:00
Markus Pilman 1033db9fba Revert change 2021-03-25 14:00:07 -06:00
Markus Pilman 1385a776da only remove files from the open map if they have no modifications in flight 2021-03-25 13:22:29 -06:00
Markus Pilman b51e4aa590 handle file renames properly 2021-03-24 19:57:24 -06:00
Markus Pilman 6a344ddeab fix typo 2021-03-24 16:56:11 -06:00
Markus Pilman f7d3b31ef8 Actually close files in simulation 2021-03-24 16:27:35 -06:00
Andrew Noyes 170c197c4c Truncate marks everything after size modified 2021-03-23 21:07:12 +00:00
Andrew Noyes e83de2b799 Fix bug: minSizeAfterPendingModifications needs to be maxed 2021-03-23 21:00:21 +00:00
Andrew Noyes 0daf6cf632 Consider extending a file with truncate as a "pending modification"
Before this, truncating and reading concurrently could cause to read
uninitialized memory. So could truncating then reading, since the effect
of the truncate in the actual file was allowed to be delayed. Now reads
will wait for a truncate that extends the file to complete if they
intersect the newly-zeroed region.
2021-03-23 19:44:36 +00:00
A.J. Beamon 25c4880ebe Merge branch 'release-6.3' into merge-release-6.3-into-master (temporarily discard all changes to BackupContainer.actor.cpp)
# Conflicts:
#	fdbclient/BackupContainer.actor.cpp
#	fdbserver/Knobs.h
2021-03-15 16:41:04 -07:00
FDB Formatster df90cc89de apply clang-format to *.c, *.cpp, *.h, *.hpp files 2021-03-10 10:18:07 -08:00
Steve Atherton 318b862aa3 Apply clang-format to backup changes. 2021-03-08 01:49:29 -08:00
Steve Atherton a397d8625f AsyncFileNonDurable now has a flag for whether or not to emulate AIO mode, so the previous behavior limits are preserved when this flag is set. AsyncFileDurable writes which are selected to be durable are again done in a single write, and the logic to handle non-aligned writes for non-AIO mode is more clear and commented. In simulation, backup files on local filesystems are written with random buffer sizes. Backup container unit test now uses more random file sizes and limits memory consumption for all files being written in parallel. 2021-03-07 22:21:10 -08:00
Steve Atherton 1d00c41385 Bug fixes: Avoid empty writes, avoid 0 length truncation, and make AsyncFileNonDurable support writes at arbitrary offsets and lengths. Increase randomness of IBackupFile appends in backup container unit test. 2021-03-05 17:45:36 -08:00
Andrew Noyes 4ee97c0784 Use clang-tidy to automatically fix missing overrides
Use `clang-tidy -p . $file -checks='-*,modernize-use-override' -header-filter='.*' -fix`
to fix missing overrides, and then use git clang-format to reformat just
those changes. This went pretty well for most files.

Formatting the following files went off the rails, so I'm going to
follow up with a commit that's just clang-tidy and no clang-format.

- fdbclient/DatabaseBackupAgent.actor.cpp
- fdbclient/FileBackupAgent.actor.cpp
- fdbserver/OldTLogServer_4_6.actor.cpp
- fdbmonitor/SimpleIni.h
- fdbserver/workloads/ClientTransactionProfileCorrectness.actor.cpp
2021-01-26 02:04:12 +00:00
sfc-gh-tclinkenbeard d15441e85c Replace non-standard sealed with final 2020-12-08 09:09:30 -08:00
sfc-gh-tclinkenbeard 4669f837fa Add uses of makeReference 2020-11-07 22:10:18 -08:00
sfc-gh-tclinkenbeard 71d0ef676c Use override where applicable in fdbrpc 2020-10-07 19:55:05 -07:00
sfc-gh-tclinkenbeard c8b774a30a Explicitly mark IAsyncFile functions as overrided 2020-08-19 18:17:32 -07:00
sfc-gh-tclinkenbeard 157700e5b6 Make IAsyncFile const-correct 2020-08-19 17:34:56 -07:00
Alex Miller 7a500cd37f A giant translation of TaskFooPriority -> TaskPriority::Foo
This is so that APIs that take priorities don't take ints, which are
common and easy to accidentally pass the wrong thing.
2019-06-25 02:47:35 -07:00
A.J. Beamon 5f55f3f613 Replace g_random and g_nondeterministic_random with functions deterministicRandom() and nondeterministicRandom() that return thread_local random number generators. Delete g_debug_random and trace_random. Allow only deterministicRandom() to be seeded, and require it to be seeded from each thread on which it is used. 2019-05-10 14:01:52 -07:00
Andrew Noyes 067a445e06 Replace unused _ variables with wait(success(...)) 2019-02-12 17:30:30 -08:00