Commit Graph

1575 Commits

Author SHA1 Message Date
sfc-gh-tclinkenbeard a71099471b Update copyright header dates 2022-03-21 13:36:23 -07:00
Andrew Noyes 68c03a7e32
Jemalloc integration fixes (#6626)
* Set default for USE_JEMALLOC initially in ConfigureCompiler

Instead of trying to change the value later on. This fixes the valgrind
build, which was previously incorrectly getting jemalloc involved.

* Check aligned_alloc result for null

And OOM if so - don't assert

* Check that we can allocate magazines with no internal fragmentation

We may want to do this so that the jemalloc heap profiler has some
knowledge of FastAlloc

* Populate TestFile field for noSim tests in TestHarness

* Remove handling for nonexistent "ActualRun"
2022-03-17 15:17:27 -07:00
sfc-gh-tclinkenbeard 320c115c71 Apply clang-format to mis-formatted files 2022-03-16 14:25:32 -07:00
sfc-gh-tclinkenbeard 58de6e22cc Add BalanceOnRequests boolean parameter for ModelInterface 2022-03-16 14:25:32 -07:00
Trevor Clinkenbeard 765e018afb
Merge pull request #6580 from sfc-gh-tclinkenbeard/const-smoother
Mark `Smoother::smooth*` methods `const`
2022-03-16 13:43:25 -07:00
Steve Atherton 59762fc784
Merge pull request #6423 from sfc-gh-satherton/redwood-bug-fixes-and-memory-leak
Redwood memory usage and small memory leak fixes
2022-03-15 16:52:28 -07:00
sfc-gh-tclinkenbeard baec03090e Fix "guarantee" misspelling 2022-03-14 16:33:09 -07:00
sfc-gh-tclinkenbeard 8dcac2f76d Fix typos 2022-03-13 10:02:11 -03:00
sfc-gh-tclinkenbeard 82f709c9d3 Use CRTP to remove duplicate code from Smoother.h 2022-03-11 08:40:24 -04:00
sfc-gh-tclinkenbeard 3a6568580a Improve encapsulation of TimerSmoother 2022-03-11 07:47:26 -04:00
Mohamed Oulmahdi 9e81945301 Enable encryption for Windows 2022-03-11 10:06:07 +01:00
sfc-gh-tclinkenbeard 9aca5f8011 Mark several methods const 2022-03-11 00:47:35 -04:00
sfc-gh-tclinkenbeard a7bce77987 Mark Smoother::smooth* methods const 2022-03-11 00:44:43 -04:00
Tao Lin e2c7c30faf
GetMappedRange support serializable & check RYW & continuation (#6181) 2022-03-10 10:05:44 -08:00
Yi Wu e6950abae6 Use jemalloc for SQLite/Redwood page cache allocation 2022-03-09 11:48:08 -08:00
Josh Slocum 04f678d515 Fixing sample logic 2022-03-07 11:20:24 -06:00
Josh Slocum 665e182bcc TSS Metrics improvements 2022-03-07 11:20:24 -06:00
Steve Atherton f03c0b8c3c Added ISimulated::restarted for detecting a restarted simulation test. 2022-03-04 17:19:46 -08:00
Jingyu Zhou 1a5bf25b5c Update code base to use fmt 8.1.1 2022-03-04 15:52:06 -08:00
A.J. Beamon cdebda35ab
Merge pull request #5725 from sfc-gh-jfu/jfu-grv-cache
Add transaction option for clients to use cached read versions
2022-03-04 09:17:27 -08:00
Andrew Noyes 7a9217a392
Add contrib/debug_determinism (#6389)
* Add contrib/debug_determinism

Add an instrumentation-based technique for debugging unseen mismatches. Also guard a few existing sources of nondeterminism that don't affect unseen with the DEBUG_DETERMINISM macro.

Also change the simulated run loop to not run as the only task inside the real run loop, since that was a source of nondeterminism.

Also fix nondeterminism from calling timer_int

* Add StorageMetadataType::currentTime

Basically a deterministic-in-simulation version of timer_int that we can
use instead of timer_int for StorageMetadataType::createdTime
2022-02-25 12:54:31 -08: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
Jon Fu 2e2c8bf88c Merge branch 'main' of github.com:apple/foundationdb into jfu-grv-cache 2022-02-22 12:43:55 -05:00
Mohamed Oulmahdi d32d18ea64 Fix purgeOutdatedHistory 2022-02-18 11:47:44 +01:00
Jon Fu d399daebed Merge branch 'main' of github.com:apple/foundationdb into jfu-grv-cache 2022-02-15 15:09:40 -05:00
Trevor Clinkenbeard 3b4cbded96
Merge pull request #6374 from sfc-gh-ajbeamon/protocol-version-pretty-print
Log protocol version as a hex string rather than a uint64_t
2022-02-14 13:51:00 -08:00
Jon Fu 7492b755d8 Merge branch 'main' of github.com:apple/foundationdb into jfu-grv-cache 2022-02-14 14:06:49 -05:00
A.J. Beamon 1b7e790211 When inserting multiple streams into an EndpointMap, don't assign them in the well-known endpoint space 2022-02-11 12:59:12 -08:00
A.J. Beamon 0a1bcf7a29 Log protocol version as a hex string rather than a uint64_t. 2022-02-10 13:57:48 -08:00
Jon Fu 458e708272 addressed code review comments: renamed variables, small functional changes, style changes 2022-02-10 16:17:54 -05:00
Jon Fu 9c0a512cf5 Merge branch 'main' of github.com:apple/foundationdb into jfu-grv-cache 2022-02-07 14:51:12 -05:00
Ata E Husain Bohra 591ef57857
Upgrade AES 128 GCM -> AES 256, StreamCipher code refactor (#6314)
* Upgrade AES 128 GCM -> AES 256, StreamCipher code refactor

Major changes proposed are:
1. Refactor StreamCipher code to enable instantiation of
   multiple encryption keys. However, code still retains
   a globalEncryption key semantics used in Backup file
   encryption usecase.
2. Enhance StreamCipher to provide HMAC signature digest
   generation. Further, the class implements HMAC encryption
   key derivation function.
3. Upgrade StreamCipher to use AES 256 GCM mode from currently
   supported AES 128 GCM mode.
   Note: The code changes the encryption key size, however, the
         feature is NOT currently in use, hence, should be OK.
3. Add EncryptionOps validation and benchmark toml supported
   workload, it does the following:
   a. Allow user to configure encrypt-decrypt of a fixed size
      buffer or variable size buffer [100, 512K]
   b. Allow user to configure number of interactions of the runs,
      in each iteration: generate random data, derive an encryption
      key using HMAC SHA256 method, encrypt data and
      then decrypt data. It collects following metrics:
    i) time taken to derive encryption key.
    ii) time taken to encrypt the buffer.
    iii) time taken to decrypt the buffer.
    iv) total bytes encrypted and/or decrypted
   c. Along with stats it basic basic validations on the encrypted
      and decrypted buffer
   d. On completion for test, records the above mentioned metrics
      in trace files.
2022-01-31 19:52:44 -06:00
Renxuan Wang 2ea4146e1f Add resolveTCPEndpointBlocking() to resolve hostnames where async resolving is impossible. 2022-01-28 12:20:41 -08:00
Ata E Husain Bohra 87ee4cf958 Add new FDB EncryptKeyProxy role
Major changes includes:

1. Add a new FDB role responsible- EncyrptKeyProxy. The role is
   responsible to expose APIs to fetch encyrption keys interacting
   with external Encryption KeyManager interface.
2. The process is a FDB singleton process following similar recruitment
   rules as other singleton processes in the system.
3. Code to recruit the worker process; given the encryption keys are
   needed during recovery (decode TLog records), for now the process
   is co-located in same datacenter as ClusterController.
4. Skeleton process actor code; more functionality will be added in
   subsequent PRs.

NOTE: The code is protected under a SERVER_KNOB with the default
      value as 'false' for now.
2022-01-25 17:38:27 -08:00
Jon Fu 915e2f6c1c Merge branch 'main' of github.com:apple/foundationdb into jfu-grv-cache 2022-01-20 16:17:20 -05:00
Renxuan Wang e642b2f5bc Address comments. 2022-01-18 14:34:18 -08:00
Renxuan Wang 28832a99d6 Address comment. 2022-01-18 14:34:18 -08:00
Renxuan Wang b8bab06e16 Add the functions to set and get mock DNS.
These functions will be used in restarting tests, where mock DNS needs to be saved to and read from files.
2022-01-18 14:34:18 -08:00
Andrew Noyes 28971c5181 Fix memory leak. Closes #4482 2021-12-22 15:04:00 -08:00
Andrew Noyes 23de546586 Only build libcoro if COROUTINE_IMPL == libcoro
It doesn't build at all on mac m1
2021-12-03 16:34:35 -08:00
sfc-gh-tclinkenbeard ec64890ac1 Remove some usages of PRId64 by using fmt library 2021-11-30 23:35:36 -08:00
Andrew Noyes b6fd402a3c Add option to use boost or libcoro
By default, use boost everywhere except windows and linux x86 (for
performance reasons)
2021-11-29 13:14:15 -08:00
Renxuan Wang 46d17d748f Change member variable fromHostname to type bool.
So that it can be serialized.
2021-11-23 14:25:02 -10:00
Evan Tschannen 37c9a1320c added --print_sim_time to print simulated time to stdout 2021-11-23 15:01:44 -08:00
Evan Tschannen 6d9f134bf0 fix: merge needs to update on empty versions to release other mutations blocked by the empty version 2021-11-23 15:01:44 -08:00
Mohamed Oulmahdi fe98f1ea56 Add missing bind header for Windows (boost/bind/bind.hpp) 2021-11-22 15:50:32 +01:00
Jon Fu 3f24128da4 Merge branch 'master' of github.com:apple/foundationdb into jfu-grv-cache 2021-11-19 14:46:55 -05:00
Renxuan Wang 22e34bd6b9 Replace <boost/bind.hpp> with <boost/bind/bind.hpp>.
This eliminates many useless warnings when compiling.
`#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.`
2021-11-18 14:00:13 -08:00
Steve Atherton 035e0d6e52
Merge branch 'master' into bit-flipping-workload 2021-11-16 14:42:22 -08:00
Renxuan Wang 4630b0ccea Move DNS mock from SimExternalConnection to Sim2.
This is a revise PR of #5934. In simulation, we don't have direct access to SimExternalConnection.
2021-11-15 17:02:51 -08:00