1
0
mirror of https://github.com/apple/foundationdb.git synced 2025-06-02 11:15:50 +08:00

1495 Commits

Author SHA1 Message Date
Jon Fu
c683795f6b add python bindings and revise test code 2022-04-13 14:20:24 -04:00
Jon Fu
718119af83 simplest initial implementation of Java listTenants 2022-04-13 14:20:17 -04:00
Aaron Molitor
1328c34323 update version to 7.2.0 -- address pr comments 2022-04-11 23:23:27 -05:00
Aaron Molitor
5ba8b82ba6 update version to 7.2.0 -- address pr comments 2022-04-11 23:23:27 -05:00
Aaron Molitor
f49b761d14 update version to 7.2.0 -- pr comment 2022-04-11 23:23:27 -05:00
Aaron Molitor
cbaef8f03b update version to 7.2.0 2022-04-11 23:23:27 -05:00
Johannes M. Scheuermann
dca18ac71e Add support for the reboot command in go bindings 2022-04-11 14:56:18 -07:00
Josh Slocum
6276cebad9
Blob integration ()
* Fixing leaked stream with explicit notify failed before destructor

* better logic to prevent races in change feed fetching

* Found new race that makes assert incorrect

* handle server overloaded in initial read from fdb

* Handling more blob error types in granule retry

* Fixing rollback metadata problem, added better debugging

* Fixing version race when fetching change feed metadata

* Better racing split request handling

* fixing assert

* Handle change feed popped check in the blob worker

* fix: do not use a RYW transaction for a versionstamp because of randomize API version ()

* more merge conflict issues

* Change feed destroy fixes

* Fixing change feed destroy and move race

* Check error condition in BG file req

* Using relative endpoints for blob worker interface

* Fixing bug in previous fix

* More destroy and move race fixes

* Don't update empty version on destroy in case it gets rolled back. moved() and removing will take care of ensuring it is not read

* Bug fix ()

* fix: do not use a RYW transaction for a versionstamp because of randomize API version

* fix: if the initialSnapshotVersion was pruned, granule history was incorrect

* added a way to compress null bytes in printable()

* Fixing durability issue with moving and destroying change feeds

* Adding fix for not fully deleting files for a granule that child granules need to re-snapshot

* More destroy and move races

* Fixing change feed destroy and pop races

* Renaming bg prune to purge, and adding a C api and unit test for it

* more cleanup

* review comments

* Observability for granule purging

* better handling for change feed not registered

* Fixed purging bugs ()

* fix: do not use a RYW transaction for a versionstamp because of randomize API version

* fix: if the initialSnapshotVersion was pruned, granule history was incorrect

* added a way to compress null bytes in printable()

* fixed a few purging bugs

Co-authored-by: Evan Tschannen <evan.tschannen@snowflake.com>
2022-04-08 14:15:25 -07:00
Lukas Joswiak
73a7c32982
Add fdbcli command to read/write version epoch ()
* Initialize cluster version at wall-clock time

Previously, new clusters would begin at version 0. After this change,
clusters will initialize at a version matching wall-clock time. Instead
of using the Unix epoch (or Windows epoch), FDB clusters will use a new
epoch, defaulting to January 1, 2010, 01:00:00+00:00. In the future,
this base epoch will be modifiable through fdbcli, allowing
administrators to advance the cluster version.

Basing the version off of time allows different FDB clusters to share
data without running into version issues.

* Send version epoch to master

* Cleanup

* Update fdbserver/storageserver.actor.cpp

Co-authored-by: A.J. Beamon <aj.beamon@snowflake.com>

* Jump directly to expected version if possible

* Fix initial version issue on storage servers

* Add random recovery offset to start version in simulation

* Type fixes

* Disable reference time by default

Enable on a cluster using the fdbcli command `versionepoch add 0`.

* Use correct recoveryTransactionVersion when recovering

* Allow version epoch to be adjusted forwards (to decrease the version)

* Set version epoch in simulation

* Add quiet database check to ensure small version offset

* Fix initial version issue on storage servers

* Disable reference time by default

Enable on a cluster using the fdbcli command `versionepoch add 0`.

* Add fdbcli command to read/write version epoch

* Cause recovery when version epoch is set

* Handle optional version epoch key

* Add ability to clear the version epoch

This causes version advancement to revert to the old methodology whereas
versions attempt to advance by about a million versions per second,
instead of trying to match the clock.

* Update transaction access

* Modify version epoch to use microseconds instead of seconds

* Modify fdbcli version target API

Move commands from `versionepoch` to `targetversion` top level command.

* Add fdbcli tests for

* Temporarily disable targetversion cli tests

* Fix version epoch fetch issue

* Fix Arena issue

* Reduce max version jump in simulation to 1,000,000

* Rework fdbcli API

It now requires two commands to fully switch a cluster to using the
version epoch. First, enable the version epoch with `versionepoch
enable` or `versionepoch set <versionepoch>`. At this point, versions
will be given out at a faster or slower rate in an attempt to reach the
expected version. Then, run `versionepoch commit` to perform a one time
jump to the expected version. This is essentially irreversible.

* Temporarily disable old targetversion tests

* Cleanup

* Move version epoch buggify to sequencer

This will cause some issues with the QuietDatabase check for the version
offset - namely, it won't do anything, since the version epoch is not
being written to the txnStateStore in simulation. This will get fixed in
the future.

Co-authored-by: A.J. Beamon <aj.beamon@snowflake.com>
2022-04-08 12:33:19 -07:00
Tao Lin
eb270d44b7 Remove unnecessary FDB_API_CHANGED 2022-04-08 10:18:16 -07:00
Tao Lin
73ed34d2fb Fixes : Upgrade from 7.0.0 to 7.1.0 fails because of missing function fdb_transaction_get_mapped_range 2022-04-08 09:32:18 -07:00
Jon Fu
b0ae22f16d Merge branch 'main' of github.com:apple/foundationdb into jfu-grv-cache-multi-threaded 2022-04-06 12:28:28 -04:00
Chaoguang Lin
7d365bd1bb
Remote ikvs debugging ()
* initial structure for remote IKVS server

* moved struct to .h file, added new files to CMakeList

* happy path implementation, connection error when testing

* saved minor local change

* changed tracing to debug

* fixed onClosed and getError being called before init is finished

* fix spawn process bug, now use absolute path

* added server knob to set ikvs process port number

* added server knob for remote/local kv store

* implement simulator remote process spawning

* fixed bug for simulator timeout

* commit all changes

* removed print lines in trace

* added FlowProcess implementation by Markus

* initial debug of FlowProcess, stuck at parent sending OpenKVStoreRequest to child

* temporary fix for process factory throwing segfault on create

* specify public address in command

* change remote kv store knob to false for jenkins build

* made port 0 open random unused port

* change remote store knob to true for benchmark

* set listening port to randomly opened port

* added print lines for jenkins run open kv store timeout debug

* removed most tracing and print lines

* removed tutorial changes

* update handleIOErrors error handling to handle remote-ikvs cases

* Push all debugging changes

* A version where worker bug exists

* A version where restarting tests fail

* Use both the name and the port to determine the child process

* Remove unnecessary update on local address

* Disable remote-kvs for DiskFailureCycle test

* A version where restarting stuck

* A version where most restarting tests green

* Reset connection with child process explicitly

* Remove change on unnecessary files

* Unify flags from _ to -

* fix merging unexpected changes

* fix trac.error to .errorUnsuppressed

* Add license header

* Remove unnecessary header in FlowProcess.actor.cpp

* Fix Windows build

* Fix Windows build, add missing ;

* Fix a stupid bug caused by code dropped by code merging

* Disable remote kvs by default

* Pass the conn_file path to the flow process, though not needed, but the buildNetwork is difficult to tune

* serialization change on readrange

* Update traces

* Refactor the RemoteIKVS interface

* Format files

* Update sim2 interface to not clog connections between parent and child processes in simulation

* Update comments; remove debugging symbols; Add error handling for remote_kvs_cancelled

* Add comments, format files

* Change method name from isBuggifyDisabled to isStableConnection; Decrease(0.1x) latency for stable connections

* Commit the IConnection interface change, forgot in previous commit

* Fix the issue that onClosed request is cancelled by ActorCollection

* Enable the remote kv store knob

* Remove FlowProcess.actor.cpp and move functions to RemoteIKeyValueStore.actor.cpp; Add remote kv store delay to avoid race; Bind the child process to die with parent process

* Fix the bug where one process starts storage server more than once

* Add a please_reboot_remote_kv_store error to restart the storage server worker if remote kvs died abnormally

* Remove unreachable code path and add comments

* Clang format the code

* Fix a simple wait error

* Clang format after merging the main branch

* Testing mixed mode in simulation if remote_kvs knob is enabled, setting the default to false

* Disable remote kvs for PhysicalShardMove which is for RocksDB

* Cleanup #include orders, remove debugging traces

* Revert the reorder in fdbserver.actor.cpp, which fails the gcc build

Co-authored-by: “Lincoln <“lincoln.xiao@snowflake.com”>
2022-03-31 17:08:59 -07:00
Tao Lin
001909be08
Fixes for when getMappedRange cannot parse as tuple () 2022-03-31 14:06:45 -07:00
A.J. Beamon
5469b57a2b Add a note that opening a tenant does not check whether that tenant exists in the cluster 2022-03-31 11:39:50 -07:00
A.J. Beamon
be7315473a Move tenant creation/deletion into a TenantManagement class 2022-03-30 16:31:28 -07:00
A.J. Beamon
6570ae44c6 Use special keys to create/delete tenants 2022-03-30 16:31:28 -07:00
Jon Fu
995f1b3601 Support tuples in Java tenants 2022-03-30 16:31:28 -07:00
A.J. Beamon
a2a97e7176 Add tenant support to the Java bindings 2022-03-30 16:31:28 -07:00
Jon Fu
4677b59fd8 Merge branch 'main' of github.com:apple/foundationdb into jfu-grv-cache-multi-threaded 2022-03-30 15:29:56 -04:00
Jon Fu
f266695a76 clear shared state map entries on version upgrade and use currentProtocolVersion instead of piping version through function parameters 2022-03-30 15:28:55 -04:00
A.J. Beamon
fc68cdf45f
Merge pull request from sfc-gh-ajbeamon/python-tenant-management-module
Move Python tenant management to its own module
2022-03-30 12:03:08 -07:00
Jon Fu
3283d07b4c Merge branch 'main' of github.com:apple/foundationdb into jfu-grv-cache-multi-threaded 2022-03-30 13:44:28 -04:00
Jon Fu
9d0a520fe0 add ProtocolVersion to shared state and state cluster map 2022-03-30 13:28:06 -04:00
Xiaoxi Wang
e644c6da49
Merge pull request from sfc-gh-xwang/memory-test-ide
fix cmake error after adding memory test when OPEN_FOR_IDE=ON
2022-03-29 14:23:16 -07:00
Jon Fu
53d252fda0 Merge branch 'main' of github.com:apple/foundationdb into jfu-grv-cache-multi-threaded 2022-03-29 17:23:08 -04:00
Jon Fu
bdbe78e48f address code review comments 2022-03-29 17:20:22 -04:00
Andrew Noyes
d727e7648e Fix a few memory issues found by ASAN 2022-03-29 12:39:12 -07:00
Xiaoxi Wang
bc3e5cdaa1 fix cmake error when OPEN_FOR_IDE=ON 2022-03-29 12:02:56 -07:00
Josh Slocum
721c64b698 Adding Blob Granule Client C Unit Tests 2022-03-28 15:42:33 -05:00
A.J. Beamon
3cf0ea5950
Merge pull request from sfc-gh-ajbeamon/fix-tenant-map-range-read-bug
Fix bug in tenant map range reads when the end key is outside of the tenant map range
2022-03-28 10:55:33 -07:00
Steve Atherton
478ff1eb76
Merge pull request from sfc-gh-anoyes/anoyes/fast-alloc
Move most usage of FastAlloc to malloc
2022-03-26 15:46:05 -07:00
A.J. Beamon
2475c4e2d6 Fix various non-compiling code errors. 2022-03-25 15:56:49 -07:00
A.J. Beamon
48447c2788 Add the tenant management module to CMakeLists. Don't test tenants before API version 710. 2022-03-25 14:35:16 -07:00
A.J. Beamon
e8a38bb048 Fix bug in tenant map range reads when the end key is outside of the tenant map range. 2022-03-25 14:24:25 -07:00
A.J. Beamon
b4cfcc10d3 Move Python tenant management to its own module 2022-03-25 11:36:35 -07:00
Josh Slocum
bf3da72637 Merge branch 'main' into bg_client_bindings_improvements 2022-03-24 15:56:30 -05:00
Josh Slocum
b42c49ca0a Adding full file length for future-proofing 2022-03-24 15:56:03 -05:00
Josh Slocum
b92c6ea92c granule parallelism, metrics, and other improvements to bg client bindings 2022-03-24 13:44:09 -05:00
A.J. Beamon
77ce0f4fc7 Add a unit test in Python to exercise some of the tenant code. Add some comments to the allocate and delete tenant implementations. 2022-03-23 15:50:06 -07:00
A.J. Beamon
8b92d3fccd Use special keys to create/delete tenants 2022-03-23 14:46:56 -07:00
Jon Fu
8e848f16df Support tuples in python tenants 2022-03-23 14:46:55 -07:00
A.J. Beamon
ce03f5783d Add tenant support to Python 2022-03-23 14:46:55 -07:00
A.J. Beamon
ca653c77ee
Tenant binding tester support ()
* Add binding tester support for tenants

* Configure tenant_mode=optional_experimental in the binding tester

* Use the special key-space to delete tenants in between binding tester runs.

* Separate tenant tester spec into its own file.
2022-03-23 13:57:45 -07:00
Jon Fu
344198793d remove TODO comment 2022-03-23 16:50:55 -04:00
Jon Fu
7c3151142e Merge branch 'main' of github.com:apple/foundationdb into jfu-grv-cache-multi-threaded 2022-03-23 16:41:33 -04:00
Jon Fu
4466e00716 Fix multithreaded GRV cache code and enable grv caching in multithreaded ctest suite 2022-03-23 16:09:12 -04:00
Andrew Noyes
07eae17068 Add fdb_c_client_memory_test 2022-03-22 14:13:59 -07:00
sfc-gh-tclinkenbeard
a71099471b Update copyright header dates 2022-03-21 13:36:23 -07:00
A.J. Beamon
fd81ef99c0
Merge pull request from sfc-gh-ajbeamon/fdb-tenant-fdbcli
Add fdbcli support for tenants
2022-03-21 11:26:10 -07:00