Commit Graph

18302 Commits

Author SHA1 Message Date
Xiaoxi Wang 6dc5921575
createdTime based storage wiggler (#6219)
* add storagemetadata

* add StorageWiggler;

* fix serverMetadataKey bug

* add metadata tracker in storage tracker

* finish StorageWiggler

* update next storage ID

* change pid to server id

* write metadata when seed SS

* add status json fields

* remove pid based ppw iteration

* fix time expression

* fix tss metadata nonexistence; fix transaction retry when retrieving metadata

* fix checkMetadata bug when store type is wrong

* fix remove storage status json

* format code

* refactor updateNextWigglingStoragePID

* seperate storage metadata tracker and store type tracker

* rename pid

* wiggler stats

* fix completion between waitServerListChange and storageRecruiter

* solve review comments

* rename system key

* fix database lock timeout by adding lock_aware

* format code

* status json

* resolve code format/naming comments

* delete expireNow; change PerpetualStorageWiggleID's value to KeyBackedObjectMap<UID, StorageWiggleValue>

* fix omit start rount

* format code

* status json reset

* solve status json format

* improve status json latency; replace binarywriter/reader to objectwriter/reader; refactor storagewigglerstats transactions

* status timestamp
2022-02-04 15:04:30 -08:00
Aaron Molitor 3a4e93604a
Update CONTRIBUTING.md 2022-02-04 13:29:49 -06:00
Markus Pilman 4414df1914
Merge pull request #6279 from sfc-gh-rjenkins/threadname-issue-6064
Make better use of thread names.
2022-02-04 08:46:23 -07:00
Johannes M. Scheuermann 9985e0d350 Fix go style issues 2022-02-03 20:48:19 -08:00
Andrew Noyes 4bf14e6c47
Create joshua package from ctest tests (#6237)
* Add ctest_to_joshua.py

* WIP

* Normalize python3

* set -euxo pipefail

* Strip binary files

* Remove unnecessary file copy

* Redirect stderr to stdout

* Fix syntax

* Set BASH_XTRACEFD=1
2022-02-03 15:07:41 -08:00
Jingyu Zhou f361f5a96c Rename isEmptyMessage to messagesWritten
The variable name means exactly the opposite.
2022-02-03 14:55:44 -08:00
Andrew Noyes 02fcb1a239
Deprecate transaction_include_port_in_address (#6332)
* Deprecate transaction_include_port_in_address

Update the description to start with Deprecated, so that it will be
deprecated in the generated java files.

* Update generated.go
2022-02-03 14:36:01 -08:00
A.J. Beamon 1666211252
Merge pull request #6283 from sfc-gh-ajbeamon/adjust-protocol-version
Unset the last bit of the protocol version
2022-02-03 12:26:28 -08:00
Markus Pilman 66b43d4426
Merge pull request #6330 from sfc-gh-jslocum/tss_restarting_fix
Fixing TSS buggify in restarting tests
2022-02-03 08:02:38 -07:00
Josh Slocum b324cf4bc4 Fixing TSS buggify in restarting tests 2022-02-03 06:46:28 -06:00
Steven Li 36c6e23700
Add TraceEvent severity knob (#6326)
* add knob for trace event severity

* add knob for TraceEvent severity

* fix format

* fix switch format

* moved intToSeverity call inside __test initialization

* updated knob name

* fix line length format

* fix format

* git clang-format
2022-02-02 11:36:17 -08:00
A.J. Beamon 31adbce2f3 Clarify the expectations for the current protocol version and min invalid protocol version in comments. Add static asserts to validate those expectations, where possible. 2022-02-02 10:02:01 -08:00
Ray Jenkins dd45805312
Merge branch 'apple:main' into threadname-issue-6064 2022-02-01 17:40:07 -06:00
A.J. Beamon 65f2c14f31
Merge pull request #6320 from johscheuer/add-fdbcli-loggroup
Add LogGroup support to fdbcli
2022-02-01 09:13:18 -08: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
A.J. Beamon 8c00ba6716
Merge pull request #6324 from sfc-gh-ajbeamon/high-contention-allocator
Rename high contention allocator implementation in fdbclient
2022-01-31 15:51:03 -08:00
A.J. Beamon 7195d4dadd Fix formatting 2022-01-31 14:43:04 -08:00
A.J. Beamon 6affc58e97 Rename high contention allocator implementation in fdbclient 2022-01-31 14:25:38 -08:00
Markus Pilman 60cbce72c2
Merge pull request #6317 from sfc-gh-ajbeamon/high-contention-allocator
Added a generic high contention allocator implementation to fdbclient
2022-01-31 14:50:51 -07:00
A.J. Beamon 6ca8f08da8
Merge pull request #6293 from sfc-gh-ajbeamon/fdbcli-print-at-col-stream
Support other output streams in fdbcli printAtCol
2022-01-31 13:16:27 -08:00
Trevor Clinkenbeard e6b02532a6
Merge pull request #6192 from sfc-gh-tclinkenbeard/improve-commitbatcher-performance
Make `VectorRefPreserializer` move constructor noexcept
2022-01-31 09:52:51 -08:00
Johannes M. Scheuermann 3b0feebd5d Add LogGroup support to fdbcli 2022-01-31 17:47:39 +00:00
A.J. Beamon d7819f8387
Merge pull request #6304 from sfc-gh-ajbeamon/reset-copy-trstate
Copy transaction state during reset
2022-01-31 09:11:04 -08:00
Vaidas Gasiunas 95074c2b0e
Merge pull request #6313 from sfc-gh-ajbeamon/split-management-api
Split the management API into two parts
2022-01-31 13:22:07 +01:00
A.J. Beamon 76c7df160f
Merge pull request #6295 from sfc-gh-ajbeamon/optional-and-default-boost-hash
Add a hash function for Optional and a default boost hash function
2022-01-28 17:26:10 -08:00
Ray Jenkins 6a1fe2489a format fixes 2022-01-28 18:21:42 -06:00
A.J. Beamon 39a7dc7a2d Add two unit tests for the new hashing functionality 2022-01-28 15:56:58 -08:00
A.J. Beamon 0dabd85e3b Add a hash function for Optional. Add a default boost hash function for any type that is not boost hashable but can be hashed using std::hash. 2022-01-28 15:56:58 -08:00
A.J. Beamon 027fe80594 Added a generic high contention allocator implementation to fdbclient. This is an adapted version of the flow bindings HCA implementation. 2022-01-28 15:34:30 -08:00
Ray Jenkins ef4e61ee33 Use GetLastError to include errno data in trace logs. 2022-01-28 17:27:41 -06:00
Ray Jenkins f9f0fb0781 Better error handling for pthread_setname_np.
In unit and simulation testing calls to pthread_setname_np may return errors,
as the threads may complete before calls to setname can be executed. This change
adds better error handling for cases where ENOENT or ESRCH is returned during testing.
Previously the ASSERT_EQ would cause tests to fail if a non-zero return value was encountered.

This change will trace log with a SevWarn when ENOENT or ESRCH is encountered. Otherwise
it will trace with SevError and throw a platform_error.
2022-01-28 16:18:22 -06:00
A.J. Beamon 89f4ed7481
Merge pull request #6296 from sfc-gh-ajbeamon/mark-external-system-transactions
Mark various externally exposed system transactions as read/access system keys
2022-01-28 14:16:40 -08:00
Andrew Noyes 96cbfe668c
Fix flaky ctest tests (#6310)
* Use localhost cluster for trace_partial_file_suffix_test

This way we get a predictable 127.0.0.1 in the trace file name

* Skip suspend test of pidof is not available

* Avoid writing to closed trace log

calling fdb_network_stop sends a "close" message to the trace thread,
but the network thread might can still be running and sending "flush"
messages to the network thread. This change basically ignores any
flushes that come after a close.

* Ensure unique ports for multi-process tests
2022-01-28 13:16:44 -08:00
A.J. Beamon 213ddc9ac3
Merge pull request #6315 from sfc-gh-ajbeamon/fix-init-order
Fix constructor initialization order warning
2022-01-28 12:46:55 -08:00
Renxuan Wang f9f3735f73 Add resolveHostnamesBlocking() in ConnectionString and IClusterConnectionRecord.
Also, combine IClusterConnectionRecord::getConnectionString() and IClusterConnectionRecord::getMutableConnectionString() to IClusterConnectionRecord::getConnectionString(), and rename setConnectionString() to setAndPersistConnectionString().
2022-01-28 12:20:41 -08:00
Renxuan Wang 2ea4146e1f Add resolveTCPEndpointBlocking() to resolve hostnames where async resolving is impossible. 2022-01-28 12:20:41 -08:00
A.J. Beamon 2eda48416c Undo some changes from LOCK_AWARE to READ_LOCK_AWARE. Apparently we have some dependencies in composed functions where a read-only function is setting lock awareness to the benefit of another function that does writes. 2022-01-28 10:55:02 -08:00
gaozengqi 23ea6e2c7e Fix typo 2022-01-28 10:40:33 -08:00
gaozengqi f1bd0f16da Run clang-format 2022-01-28 10:40:33 -08:00
gaozengqi a0c0342e76 Fix usage 2022-01-28 10:40:33 -08:00
gaozengqi 0e6dbf434b Fix use allKeys.end 2022-01-28 10:40:33 -08:00
gaozengqi 1419d1aab7 Fix short hand 2022-01-28 10:40:33 -08:00
gaozengqi 697d075e20 Add role 'kvfiledump' to dump key-values from storage file 2022-01-28 10:40:33 -08:00
A.J. Beamon 0803abedaa Adjust the name order of constructor variable initialization to match declaration order. 2022-01-28 10:27:13 -08:00
A.J. Beamon e3830c157f Split the management API into two parts, one that is generic and has no native API dependency and another that does have a native API dependency. 2022-01-28 10:18:23 -08:00
Ray Jenkins aa41c04993 add back threadnames for debugging 2022-01-28 11:57:52 -06:00
Renxuan Wang 4a8e2a80e6 Improve/fix disk metrics.
1. Introduce processDiskReadSeconds and processDiskWriteSeconds, which stands for disk read/write times `since the last logging`. They can only be obtained on Linux and macOS, and will be 0 on Windows and FreeBSD;
2. Rename `busyTicks` to `IOMilliSecs`;
3. On FreeBSD, the metrics should be collected among all devices.
2022-01-27 14:40:32 -08:00
A.J. Beamon 8418cb2839 Mark various externally exposed system transactions as read/access system keys. Also adjust a few lock aware declarations to read lock aware. 2022-01-27 13:58:33 -08:00
A.J. Beamon 29f0bcda21 Copy transaction state during reset to avoid potential issues with operations that were in-flight during the reset 2022-01-27 13:13:48 -08:00
Ray Jenkins f32fa3a2c8 format fix 2022-01-27 12:38:05 -06:00