1
0
mirror of https://github.com/apple/foundationdb.git synced 2025-06-01 18:56:00 +08:00

20780 Commits

Author SHA1 Message Date
Lukas Joswiak
3b3ef49d40 Remove unnecessary transaction initialization
`ReadYourWritesTransaction` has memory allocated before being passed to
the main thread. This allows both threads to continue to access the
transaction object. Currently, the transaction gets allocated and
initialized on the foreign thread, and then re-initialized on the main
thread. This causes a bunch of extra, unnecessary work for each
`ReadYourWritesTransaction` where the temporary object gets destructed.

The fix is to only allocate memory for the `ReadYourWritesTransaction`
on the foreign thread, and then initialize it once on the main thread.
2022-06-10 16:53:19 -07:00
Yao Xiao
0bb02f6415
[Sharded RocksDB] 3/N Implement functions for range clear. () 2022-06-09 10:50:39 -07:00
Junhyun Shim
631a59a65e
Merge pull request from sfc-gh-mdvorsky/mdvorsky/remove_tester_api_wrapper
Remove TesterApiWrapper, replace its uses with fdb_api.hpp
2022-06-09 10:42:05 +02:00
Jingyu Zhou
7acd184a38
Merge pull request from jzhou77/fix-status-memory
Add rss_bytes to process memory and fix available_bytes calculation
2022-06-08 13:10:51 -07:00
Robert Barabas
8606923da2
Arm64 related build fixes ()
* Add missing include

* Fix open call on arm64

* Bump up doctest to 2.4.8
2022-06-08 11:20:27 -07:00
Jingyu Zhou
b9ff6bc129 Address AJ's comments 2022-06-08 09:38:32 -07:00
Andrew Noyes
07f49392ac
Avoid using structured bindings in doctest assertions ()
* Avoid using structured bindings in doctest assertions

clang doesn't allow this with the latest releases of doctest

This will unblock 

* Add constructor to MappedKV
2022-06-08 09:36:18 -07:00
Andrew Noyes
e0eedc6a37
Fix asan message detection ()
* Fix asan message detection

* Fix heap-buffer-overflow

Call to strlen on a not necessarily null terminated string

* Fix gcc build
2022-06-08 09:35:30 -07:00
Sreenath Bodagala
fe5f11358f
Merge pull request from sbodagala/main
Introduce a knob that controls the placement of remote storage server commit versions in version vector
2022-06-08 12:18:15 -04:00
Marian Dvorsky
21b041317c Address review comments 2022-06-08 16:45:29 +02:00
Markus Pilman
d141347500
Merge pull request from Doxense/fix-windows-tests
Fix windows tests
2022-06-08 08:18:47 -06:00
Bharadwaj V.R
886f56ff11
Merge pull request from sfc-gh-bvr/ddneat
A few uses of structured bindings to avoid use of .first and .second in pairs
2022-06-08 00:13:06 -07:00
Bharadwaj V.R
d4b983264b
Merge branch 'apple:main' into ddneat 2022-06-07 23:10:56 -07:00
Bharadwaj V.R
b40553556b
Merge pull request from sfc-gh-bvr/mcvf-nothrottle
Remove last-limited check from DDMountainChopper and DDValleyFiller
2022-06-07 21:15:47 -07:00
Yi Wu
bbf8cb4b02
GetEncryptCipherKeys helper function and misc encryption changes ()
Adding GetEncryptCipherKeys and GetLatestCipherKeys helper actors, which encapsulate cipher key fetch logic: getting cipher keys from local BlobCipherKeyCache, and on cache miss fetch from EKP (encrypt key proxy). These helper actors also handles the case if EKP get shutdown in the middle, they listen on ServerDBInfo to wait for new EKP start and send new request there instead.

The PR also have other misc changes:
* EKP is by default started in simulation regardless of. ENABLE_ENCRYPTION knob, so that in restart tests, if ENABLE_ENCRYPTION is switch from on to off after restart, encrypted data will still be able to be read.
* API tweaks for BlobCipher
* Adding a ENABLE_TLOG_ENCRYPTION knob which will be used in later PRs. The knob should normally be consistent with ENABLE_ENCRYPTION knob, but could be used to disable TLog encryption alone.

This PR is split out from .
2022-06-07 21:00:13 -07:00
Jingyu Zhou
217ba24b6f Add rss_bytes to process memory and fix available_bytes calculation
Since memory is now limited with RSS size, add RSS size in status json for
reporting. Also change how available_bytes is calculated from:
  (available + virtual memory) * process_limit / machine_limit
to:
  (available memory) * process_limit / machine_limit
2022-06-07 16:44:14 -07:00
Andrew Noyes
1997e6057c
Fix a heap-use-after-free in a unit test ()
* Fix a heap-use-after-free in a unit test

The data passed to IAsyncFile::write must remain valid until the future
is ready.

* Use holdWhile instead of a new state variable
2022-06-07 14:48:01 -07:00
Josh Slocum
a0bb585260
Merge pull request from sfc-gh-jslocum/blob_metadata_valgrind_fix
fixes for blob metadata memory from valgrind
2022-06-07 15:24:11 -05:00
Andrew Noyes
1f8fc32f41
Save a memcpy in the tlog peek path () 2022-06-07 13:22:56 -07:00
Ray Jenkins
5a4082bfe8
Add DistributedTracerClient enum to mako. () 2022-06-07 14:07:08 -05:00
Josh Slocum
ae865027d6 fixes for blob metadata memory from valgrind 2022-06-07 13:50:11 -05:00
Sreenath Bodagala
96a88e3847 Merge remote-tracking branch 'apple-upstream/main' 2022-06-07 18:38:35 +00:00
A.J. Beamon
46e69fbe09
Merge pull request from sfc-gh-ajbeamon/fix-reverse-range-read-conflict-range
Fix bug in reverse range reads causing larger than desired conflict ranges
2022-06-07 10:59:12 -07:00
A.J. Beamon
6379d72521
Merge pull request from sfc-gh-jfu/jfu-mako-tenant-support
Add changes to mako to support performance testing with Tenants
2022-06-07 10:59:01 -07:00
A.J. Beamon
4f308b34fc Fix an off-by-one error in determining whether to include the entire range in the conflict ranges when a reverse range read returns early due to limit. 2022-06-07 08:52:10 -07:00
A.J. Beamon
c97a1168cb Fix formatting issue 2022-06-07 08:51:10 -07:00
A.J. Beamon
0431635674
Merge branch 'main' into jfu-mako-tenant-support 2022-06-07 08:43:56 -07:00
Kevin Hoxha
e579038018
Add DDSketch to mako ()
* Add logic for DDSketch in mako

* Return double from percentile() and fix crash in deserialize()

* make sure to serialize and print result from mergeSketchReport()

* clean up comments

* move ddsketch into its own file

* remove LatencySampleBin and add DDSketch to ThreadStatistics

* Update DDSketch implementation

* remove assertions that cause circular references

* add DDSketchMako as a subsclass from DDSketch

* Merge branch 'ddsketch_mako' of github.com:sfc-gh-khoxha/foundationdb into ddsketch_mako

* Revert "Merge branch 'ddsketch_mako' of github.com:sfc-gh-khoxha/foundationdb into ddsketch_mako"

This reverts commit cc29a68aefd1b385b563bfbaa09a32e399c0d233.

* add ddsketch mako class and rename export flag

* remove redundant decimal roundings

* print max/min/avg from ddsketch

* remove latency sample bin completly

* Make ThreadStatistics dump latency to a file and read from file in printReport()

* make sure to add latency data from file to final stats

* change mergeSketchReport to use new ThreadStatistics serialization (1)

* use C-style string arrays in Arguments instead of std::string

* remove unused header

* only serialize non-empty sketches

* fix CentOS build error

* Update report file count properly

* avoid deserializing empty sketches

* fix segmentation fault when getting file name for export_sketch_path

* make sure to properly add file to report_files list

* fix printing bugs when running in report mode

* fix incorrect insertion of report files

* don't use range based loop for char array

* don't reset args.num_report_files

* Update the usage info for new options

* switch to using std::vector for sketches instead of std::array

* make sure to use true/false instead of 1/0 for booleans

* remove op_name if not being used

* remove fp code in dumpThreadSamples

* replace lambda with function in printReport

* merge and print stats in seperate functions

* make sure to exit after printing report

* address review feedback

* make defaultMin, defaultMax static and move setBucketSize to protected

* switch to reverse iterators when moving backwards along bucket array
2022-06-06 18:19:31 -07:00
Yao Xiao
5f1a061e3a
Disable rocksdb metrics. () 2022-06-06 14:27:41 -07:00
Bharadwaj V.R
aa84f8925e
Merge branch 'apple:main' into mcvf-nothrottle 2022-06-06 13:18:11 -07:00
Clement Pang
043bc411ee
Make KeyArrayResult constructor public. () 2022-06-06 13:15:33 -07:00
Dan Adkins
bd47f390bd
Add simulation test for three_data_hall configuration ()
* Add simulation test for 1 data hall + 1 machine failure case.

* Disable BUGGIFY for DEGRADED_RESET_INTERVAL.

A simulation test discovered a situation where machines attempting to connect
to a dead coordinator (with a well-known endpoint) were getting themselves
marked degraded. This flapping of the degraded state prevented recovery from
completing, as it started over any time it noticed that tlogs on degraded
hosts could be relocated to non-degraded ones.

bin/fdbserver -r simulation -f tests/rare/CycleWithDeadHall.toml -b on -s 276841956
2022-06-06 13:14:49 -07:00
Bharadwaj V.R
990c789a5c
Increase quiet-database timeout when buggify is on; data-movements in simulation take longer than the timeout allows, and waiting for quiet-database does succeed when given some more time () 2022-06-06 13:13:11 -07:00
Bharadwaj V.R
7f079a6c29
Merge branch 'apple:main' into mcvf-nothrottle 2022-06-06 12:03:13 -07:00
Bharadwaj V.R
418205eeab Use bindings for brevity in DDTC UT and a few places where server_info is iterated over 2022-06-06 11:56:48 -07:00
Josh Slocum
bf69f545d3
Merge pull request from sfc-gh-jslocum/blob_granule_kms
Added blob metadata concept as new secret type, and integrated with blob granule access
2022-06-06 11:25:56 -05:00
Marian Dvorsky
f887e3e364 Address review comments 2022-06-06 16:29:42 +02:00
Josh Slocum
4310e5d6a4 Merge branch 'main' into blob_granule_kms 2022-06-06 08:07:38 -05:00
Sreenath Bodagala
3ec76b4b53 - Address a review comment 2022-06-03 21:20:32 +00:00
Sreenath Bodagala
a3c6ed2e86 - Introduce a knob that will control the placement of the commit
versions of remote storage servers in version vector. This optimization
will help reduce the size of version vector in HA configuration.
2022-06-03 19:29:54 +00:00
Josh Slocum
ff643cce76 compile fix 2022-06-03 11:50:33 -05:00
Hao Fu
96d3951205
Fix versionstamp in Tester () 2022-06-03 08:56:01 -07:00
Josh Slocum
b650410a48 Merge branch 'main' into blob_granule_kms 2022-06-03 09:13:49 -05:00
Josh Slocum
fcd20c479d addressing review comments 2022-06-03 08:36:07 -05:00
Marian Dvorsky
d41ec69b23 Remove TesterApiWrapper, replace its uses with fdb_api.hpp 2022-06-03 11:55:33 +02:00
Bharadwaj V.R
083fe01022 More uses of structured bindings to avoid use of .first and .second in pairs 2022-06-02 23:07:23 -07:00
Hao Fu
e7fa8e9f6f
Add versionstamp support in tuple ()
Tuple in C++ needs to support Versionstamp.
2022-06-02 17:44:10 -07:00
Xiaoge Su
c886a6efe4 Refactor the WriteMap.h
Split the interface and implementation, so adding debugging information
in the code will not trigger full rebuild.
2022-06-02 15:57:26 -07:00
Ata E Husain Bohra
b66509eff0
Make EncryptKeyServer and KmsConnector API to be 'tenant' name aware ()
Description

Major changes proposed include:
1. Update EncryptKeyServer APIs to be tenant aware.
2. Update KmsConnector APIs to be tenant aware

Client of above APIs such as: CP, SS and BlobWorker need to supply
encryption domain info that includes: tenantId and tenantName

Testing

1. Update EncryptKeyProxyTest
2. Update RESTKmsConnectorTest
3. Update SimKmsConnectorTest
2022-06-02 11:55:50 -07:00
Josh Slocum
872c25148f remove BUILD_ALWAYS from awssdk.cmake 2022-06-02 13:40:56 -05:00