Commit Graph

2082 Commits

Author SHA1 Message Date
Boris Korzun e04f0467a0 Disable explicit std::filesystem linking on CLang 2023-10-05 17:23:26 +03:00
Johannes M. Scheuermann 79ce8e8d22 Add the linker option back again 2023-09-29 15:20:57 +02:00
Johannes M. Scheuermann d974508599 Update CGO LDflags for new MacOS linker 2023-09-29 15:20:52 +02:00
Jingyu Zhou 872db26598
Merge pull request #10702 from DataDog/griffin/fix-db-panic-go
Fix panic when connecting to database from multiple threads in Go bindings
2023-09-26 12:56:33 -07:00
Andrew Noyes f52cffd81b Fix MacOS go build
See
https://forums.foundationdb.org/t/macos-build-finds-wrong-fdb-c-h-for-go-bindings-patch-included/3929
for details
2023-08-28 10:22:06 -07:00
Johannes M. Scheuermann c9a04d799d Fix the go tuple tests for new go version 2023-08-07 11:02:02 +02:00
Vishesh Yadav e6cd1a10e0
Merge pull request #10603 from oleg68/main-locality-doc
Added more javadoc information for com.apple.foundationdb.LocalityUtil.getAddressesForKey
2023-07-21 13:09:47 -07:00
Jingyu Zhou 4b00018a33
Fix Implib.so imports when 'amd64' architecture is using (#10618)
Co-authored-by: Alexey Marchenko <santana705736@gmail.com>
2023-07-17 12:04:56 +02:00
Oleg Samarin 1cb0a860da Added more javadoc information for com.apple.foundationdb.LocalityUtil.getAddressesForKey
(cherry picked from commit af51830eafef881f6bfd880b17982ea62f7823c2)
2023-07-10 11:04:27 +03:00
Zhe Wu 5c8a163c72
Update main branch to 7.4 (#10459)
* Update main branch to 7.4

* Update API version to 740

* Makes fdb_c_client_config_tests.py passing after API version update

* Remove from_7.3.0_until_7.4.0 and add from_7.3.0

* Update tests in fdb_c_client_config_tests.py
2023-06-15 10:19:39 +02:00
hao fu 07c02e5e6b Add comments for VERSIONSTAMP_96_CODE 2023-06-13 09:50:29 -07:00
Griffin Dunn 819fc1ef59 fix clear cache 2023-06-08 11:42:49 -04:00
Griffin Dunn 205f7861af fix panic when connecting to multiple fdb dbs at once 2023-06-08 11:32:03 -04:00
Aaron Molitor a718a31dd7 update links to foundationdb.org to reference GitHub 2023-05-30 10:15:20 -05:00
Vaidas Gasiunas 9bc55f67c3
Fix releasing watches on future cancellation (#10304)
* Test watch cleanup on cancel

* Fix clearing the database in Java integration tests

* Always cancel the futures wrapped by MVC abortable futures

* More tests for watch cleanup

* Fix clear database database in some Java integration tests
2023-05-22 22:01:27 +02:00
Andrew Noyes 4d2f038b60 Remove unnecessary duplicate declaration of fdb_tenant_list_blobbified_ranges 2023-05-18 16:20:18 -07:00
Sam Gwydir 6c16875c34
Add networkoption to disable non-TLS connections (#9984)
* Add networkoption to disable non-TLS connections

* add disable plaintext connection to fdbserver

* python doc

* Formatting

* Add tls disable plaintext connection to client api test

* review

* fix negative test

* formatting

* add TLS support to c client config tests

Adds support for TLS in the client and server separately

* add tests for disable_plaintext_connections

Test TLS and Plaintext Clusters and Clients

* Fix documentation

* Rename option to indicate it is client-only

* clearer formatting

* default to allowing plaintext connections

* add SetTLSDisablePlaintextConnection to go bindings
2023-05-13 00:14:11 +02:00
Vaidas Gasiunas d16d53739e Some more tests for future cancelations in Java bindings 2023-05-12 20:43:18 +02:00
Vaidas Gasiunas 574a4cec71 Remove debugging output in future cancellation tests 2023-05-12 16:20:54 +02:00
Vaidas Gasiunas 6594c4d302 Java binding: Fix reentrant locking in future cancelation 2023-05-12 15:58:38 +02:00
Vaidas Gasiunas 607a1040ed Testing future cancelation in Java bindings with an external client 2023-05-12 15:57:45 +02:00
Zhe Wu e3490a1af8 Update API version to 730 2023-05-10 11:26:46 -07:00
Zhe Wu a6d6c70aad
Merge pull request #10103 from halfprice/zhewu/update-main-to-7.4
Bring main branch to 7.3
2023-05-10 09:53:27 -07:00
Zhe Wu 761cdbc019 Bring main to 7.3 2023-05-09 21:14:16 -07:00
A.J. Beamon 686c391281
Merge pull request #10093 from sfc-gh-ajbeamon/apply-flake8
Fix several issues found by flake8
2023-05-09 09:05:14 -07:00
Hao Fu 3158f8b033
Fix hashCode() and equals() for MappedKeyValue (#10170) 2023-05-08 16:54:11 -07:00
Josh Slocum b5a9997217
adding DBPerTXN blob granule tests (#10095)
* adding DBPerTXN blob granule tests

* fixing comment
2023-05-08 15:43:29 +02:00
A.J. Beamon 95cf9948a1 Add API version protection for the change to use a default option for used during commit protection in Java 2023-05-03 16:18:11 -07:00
A.J. Beamon fef2967d62 Fix several issues found by flake8. Ignore E402, which detects when we have import statements not at the top of the file, since we have many files that use this pattern and are not easy to fix. 2023-05-02 10:06:40 -07:00
A.J. Beamon 182dc93ebd Apply black format to most Python files, excluding a few cases where we have Python 2 files and a few files written externally. Add external files as exclusions to the precommit checks. 2023-04-28 11:46:41 -07:00
Jay Zhuang 8e7a5b5b22 Add the helper function to support reverse range read 2023-04-19 08:31:52 -07:00
Jay Zhuang b7da2ed16c Fix RangeResult.readThrough misuse
Fix `RangeResult.readThrough` misuses:
1. KeyValueStores do not need to set readThrough, as it will not be
   serialized and return. Also setting it to the last key of the result
   is not right, it should at least be the keyAfter of the last key;
2. Fix NativeAPI doesn't set `RangeResult.more` in a few places;
3. Avoid `tryGetRange()` setting `readThrough` when `more` is false,
   which was a workaround for the above item 2;
4. `tryGetRangeFromBlob()` doesn't set `more` but set `readThrough` to
   indicate it is end, which was following the same above workaround I
   think. Fixed that.
5. `getRangeStream()` is going to set `more` to true and then let the
   `readThrough` be it's boundary.

Also added readThrough getter/setter function to validate it's usage.
2023-04-17 21:37:51 -07:00
hao fu 29161b2fda Revert matchIndex feature
It is not protocol compatible, revert it to avoid deployment issue.
Will have a new PR to have the feature if moving forward.
2023-04-17 09:39:45 -07:00
Jon Fu 30132ebac6
Expose list_blobbified_ranges for tenants in python API (#9940)
* add tenant getId api to fdbcli

* expose list_blobbified_ranges for tenants in python API
2023-04-13 13:05:37 -04:00
Ata E Husain Bohra fe0a4df06a
EaR: Implement Key Check Value semantics (#9936)
* EaR: Implement Key Check Value semantics

Description

Key Check Value (KCV) is a checksum of cryptographic encryption key
used to validate encryption keys's integrity. FDB Encryption at-rest
relies on external KMS to supply encryption keys.

Patch proposes following major changes:
1. Implement Sha256 based KCV implementation to protect against
'baseCipher' corruption in two possible scenarios:
 a) potential corruption external to FDB
 b) potential corruption within FDB processes.
2. Scheme persists computed KCV token in block encryption header,
which then gets validated as part of header validation during
decryption.
3. FDB Encryption key derivation uses HMAC_SHA256 digest generation
scheme, which allows max 64 bytes of 'cipher buffer', patch add
required check to ensure 'baseCipher' length are within bounds.
OpenSSL HMAC underlying call ignores extra length if supplied, however,
it weakens the security guarantees, hence, disallowed.

Testing

devRunCorrectness - multiple 500K runs
Valgrind & Asan - BlobCipherUnit, RESTKMSUnit, BlobGranuleCorrectness*,
EncryptionOps, EncryptKeyProxyTest
2023-04-12 14:29:31 -07:00
Vaidas Gasiunas 894f555e95
Test loop profiler using API Tester (#7174)
* Api Tester: Specify knobs in the toml file; Test loop profiler

* Gracefully stop the loop profiler thread

* Protect loop profiler thread by mutex

* Create loop  profiler thread only if is not stopped
2023-03-30 23:00:23 +02:00
Vaidas Gasiunas 7870479b66 Improve stability of test_external_client_not_matching_cluster_version_ignore 2023-03-20 17:30:35 -07:00
A.J. Beamon 33d501d36a Avoid potential access of empty optionals when printing errors in the api tester 2023-03-14 10:41:43 -07:00
Vaidas Gasiunas 910fdcd423
Disable python unit tests in sanitizer builds (#9653) 2023-03-11 15:33:56 +01:00
Marian Dvorsky 90048d1e92
Enable fdb_install of fdb_c_shim for sanitizer builds (#9646) 2023-03-10 14:33:59 +01:00
Andrew Hayworth 04cbcdee6b Fix build for ruby bindings
The ruby bindings are not currently installable. We can reproduce this
with a build from source:

```
foundationdb/tmp on  main [$?] via △ v3.25.2
zsh ❯ gem install ./bindings/ruby/fdb-7.3.0.gem
ERROR:  While executing gem ... (Gem::Package::PathError)
    installing into parent path /Users/andrew/projects/foundationdb/LICENSE of /Users/andrew/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/fdb-7.3.0 is not allowed
```

The problem is that the gemspec is interpolating the source directory
into the `files` array - and while this allows the gem to build, it
prevents it from actually being installed.

To fix it, we borrow similar code from the python bindings to copy the
necessary files and license into the build directory before building the
gem. This allows the gem to be installed:

```
foundationdb/tmp on  main [!?] via △ v3.25.2
zsh ❯ gem install ./bindings/ruby/fdb-7.3.0.gem
Successfully installed fdb-7.3.0
Parsing documentation for fdb-7.3.0
Installing ri documentation for fdb-7.3.0
Done installing documentation for fdb after 0 seconds
1 gem installed
```
2023-03-07 10:57:42 -08:00
Andrew Hayworth 55d12fe1fc Allow ruby bindings on arm64
While fixing the gem build, I noticed that the gem will not run on arm64
machines, like the new spiffy M1/M2 MacBooks. On a whim, I tried just
removing that restriction... and it does seem to work:

```
foundationdb/bindings/ruby/lib on  ahayworth/fix-ruby-binding-build [?] via 💎 v3.2.1 took 2s
zsh ❯ pry
[1] pry(main)> require 'fdb'
=> true
[2] pry(main)> FDB.api_version 720
LoadError: FoundationDB API only supported on x86_64 (not arm64)
from /Users/andrew/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/fdb-7.3.0/lib/fdbimpl.rb:40:in `<module:FDBC>'
[3] pry(main)>
```
2023-03-07 10:53:37 -08:00
Josh Slocum e1b620135b Merge branch 'main' into bg_latency_fixes 2023-03-06 09:23:11 -06:00
Junhyun Shim a2a29af56e
Temporarily disable client trace check for older version (#9578)
* Disable client trace check test on older version

Older version doesn't guarantee trace flush upon network::stop()
Comment it out for the time being

* Black-reformat authz and client config tester scripts
2023-03-06 15:36:28 +01:00
Josh Slocum 526134f598 review comments 2023-03-03 13:52:59 -06:00
Vaidas Gasiunas a0e1b4b369 Fixing exported symbols extraction from C headers for Apple build 2023-03-03 14:04:35 +01:00
Vaidas Gasiunas e95ff58b95 Reformat symbolify.py 2023-03-03 14:00:59 +01:00
Josh Slocum fdcb6aed5f add timestamp to bg verbose tester logs 2023-03-02 09:34:40 -06:00
Markus Pilman 5bebb5b4aa
Merge pull request #9492 from sfc-gh-vgasiunas/vgasiunas-api-version-defs
Centralize definition of API Version for Java, Python and C API
2023-02-28 12:04:02 -07:00
Russell Sears 3453c1a7a1 remove dependency on xerrors by replacing deprecated call to "xerrors.As". This allows the golang build to run offline. (This is simpler than adding "go mod vendor" to the developer container build.) 2023-02-27 15:38:58 -06:00