Commit Graph

1930 Commits

Author SHA1 Message Date
Evan Tschannen 88eed268c3 added a knob for how many bytes are read from disk 2023-06-11 16:10:20 -07:00
Evan Tschannen a8ceadd917 actor cancellation still needs to unset storage 2023-06-11 14:55:05 -07:00
Evan Tschannen 359e178dcd Merge branch 'main' into feature-durable-change-feed
# Conflicts:
#	fdbclient/ClientKnobs.cpp
#	fdbserver/BlobManager.actor.cpp
#	fdbserver/worker.actor.cpp
2023-06-11 13:58:35 -07:00
Evan Tschannen f69f4c73ad addressed review comments 2023-06-11 13:54:38 -07:00
Evan Tschannen 7322e21e23 fixed compiler error 2023-06-11 09:25:05 -07:00
Evan Tschannen 334a868dfe fix: respect end when reading from disk; update the starting version when leaving a hole on disk 2023-06-11 09:24:09 -07:00
Evan Tschannen d03f08f914 fix: not all mutations were being made durable 2023-06-10 18:36:02 -07:00
Evan Tschannen be8d8a8f72 fix: popping the cache was removing too many versions 2023-06-09 16:20:48 -07:00
Evan Tschannen 33a7f57da5 fix: clear the cache when popping change feeds; do not insert versions into the cache that are already durable 2023-06-09 13:49:33 -07:00
Evan Tschannen 197c39b552 cache change feeds using a storage engine to avoid reading them for the server on startup 2023-06-07 08:41:31 -07:00
Vaidas Gasiunas 60753b5b57
Fix a couple thread-safety issues (#10359)
* Make CodeProbeImpl::_hitCount atomic

* Structure access to TraceLog::logTraceEventMetrics so that it is written before a trace log is opened and only read from one thread after it is opened.

* Fix condition in assert

* Rename TraceLog::log to logMetrics and move initialization of trace log metrics into TraceLog::open

---------

Co-authored-by: A.J. Beamon <aj.beamon@snowflake.com>
2023-05-26 19:36:02 +02:00
He Liu 8ad7ec6fdf
Psm ss (#9817)
* Update NativeAPI getCheckpointForRange().

* Implemented checkpoint in SS.

* clean up.

* Disabled StorageServerCheckpointTest.

* Serialized checkpoint creation and deletion.

Simplified checkpoint GC, via deleting CheckpointMetaData::dir.

* Fixed PhysicalShardMove test. Where fetchCheckpoint target range is misset.

* Minor improvements on CheckpointMetaData and DataMoveMetaData.

* fmt.

* Optimized PhysicalShardMove test

cleanup.

* Refactored ShardedRocks checkpoint/restore for psm.

* Complete ShardedRocks::restore.

* dismiss operation_obsolete, and throw actor_cancelled.

* Validate checkpoint when !asKeyValues.

* fmt.

* Don't read from uninitialized physical shard.

* Resolved commments.

* cleanup.

* Added verify_checksum_before_restore for ShardedRocks.

* Added ShardedRocksDB checkpoint/restore unit test.

* Populate CheckpointMetaData::dir in RocksDB.

* Rename MovingIn as Adding.

* Added StorageServerUtils.

* Added physical shard move in SS.

* Fix on ApplyMetaData, doFetchFile error handling etc.

* Debugging incorrect shard size.

* Create/delete checkpoints only when Physical shard move is enabled.

* Added back SHARD_ENCODE_LOCATION_METADATA.

* Fixed bytesSample incorrect issue.

Essentially dedicated CheckpointRocksDBCF as key-value based checkpoint, will need to add a new format for the file-based checkpoint.

* Cleanup.

* Cleanup & compile rocksdb with 8.1 branch.

* clean up.

* clean up.

* Allowed request_maybe_delivered error type in FetchShard.

* Added FDBRocksDBVersion.h.

* Fixed stuck fetchShard.

* Don't create checkpoint on TSS.

* Upgrade to RocksDB 8.1.1

* Cleanup.

* Fixed accidently deleted db_path and name fields.

* Improved trace event.

* Removed redundants from previuos ShardedrocksDB.

* Cleanup.

* cleanup.

* cleanup.

* reanme `state`.

* Cleanup.

* Removed excessive TraceEvent.

* * Fixed shardMap race condition on different threads
* Added *Stats, logging data move rates.
* Added `DD_PHYSICAL_SHARD_MOVE_PROBABILITY` to support hybrid data move.

* Resolved comments.

* fmt.

* Use physical shard move in PhysicalShardMoveTest.

* Enforce physical-shard-move for PhysicalShardMoveTest.

* fmt
2023-05-23 11:18:35 -07:00
sfc-gh-tclinkenbeard 7ef66ab356 Add OutstandingWatches and WatchMapSize to TransactionMetrics 2023-05-22 12:07:10 -07:00
Hui Liu 7ca13d8f9c
support blob restore in fdbrestore (#10248) 2023-05-19 14:45:14 -07:00
A.J. Beamon 712fefd59f
Merge pull request #10213 from sfc-gh-ajbeamon/tenant-code-probes
Add code probes for tenant and metacluster code
2023-05-15 12:13:00 -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
A.J. Beamon d8141c049d Add code probes for tenant code 2023-05-10 20:44:39 -07:00
Josh Slocum 9a2365daa8
fixing bugs with tenant_mode required on external clients and changin… (#10183)
* fixing bugs with tenant_mode required on external clients and changing test to find them

* Update fdbcli/BlobKeyCommand.actor.cpp

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

---------

Co-authored-by: A.J. Beamon <aj.beamon@snowflake.com>
2023-05-09 13:41:58 -05:00
Josh Slocum e69d54fbc0
Block unblobbify (#10182)
* stregthening check for not merging consecutive blob ranges

* implementing expanded unblobbify and changing tests to account
2023-05-09 11:43:11 -05:00
Josh Slocum 6be0c74d5b
Adding explicit blob range mutation log to handle large number of ranges (#10174)
* Adding explicit blob range mutation log to handle large number of ranges

* fixing ide build
2023-05-09 11:30:04 -05:00
Jay Zhuang 0ab691b707
Merge pull request #10002 from sfc-gh-jazhuang/readThrough
Fix RangeResult.readThrough misuse
2023-04-27 09:59:11 -07:00
Xiaoxi Wang a05e078c4a Remove locations.size() == expectedShardCount assertion and add comments 2023-04-26 14:23:09 -07:00
Steve Atherton 7f6d5f296a Merge commit 'e318fc260070ba6ba604930b8f259c9b655938ea' into keybackedrangemap
# Conflicts:
#	flow/include/flow/error_definitions.h
2023-04-25 14:21:23 -07:00
Jingyu Zhou 6b15d67928
Merge pull request #10010 from jzhou77/main
Properly handle proxy_memory_limit_exceeded error for GetKeyServerLocationsRequest
2023-04-25 11:18:03 -07:00
Jingyu Zhou 74bb659f71 Simplify backoff calls per comment 2023-04-25 09:15:16 -07:00
Jingyu Zhou c544985fe5 Add trace events and adjust backoff
For each success, half the backoff until less than initial backoff value, then
set the backoff to 0.
2023-04-20 15:56:06 -07:00
Jingyu Zhou a83295e3bd Add backoff to lookupTenantImpl for commit_proxy_memory_limit_exceeded error 2023-04-19 16:55:46 -07:00
Jingyu Zhou 3bfd353a22 Add backoff to getKeyLocation_internal as well 2023-04-19 16:45:50 -07:00
Jingyu Zhou ad1c7bba74 Make commit_proxy_memory_limit_exceeded error a database level backoff
Since this error means the database is overloaded.
2023-04-19 15:52:16 -07:00
Jingyu Zhou b49625d45b Properly handle proxy_memory_limit_exceeded error for GetKeyServerLocationsRequest
Also add buggify to inject the error in simulation.
2023-04-19 09:35:09 -07:00
Steve Atherton 53ee26d758 Changed KeyBackedTypes to an actor file. Added TypedKeySelectors for Map and Set classes and getRange() keySelector methods. Added debug macro for KeyBackedTypes. Rewrote KeyBackedRangeMap using keyselectors on KeyBackedMap. 2023-04-18 22:21:19 -07:00
Ankita Kejriwal 6b8e35fd19
Merge pull request #9964 from sfc-gh-xwang/fix/main/comments
fix HealthMetrics update bug and correct comments about readLoadKSecond()
2023-04-18 16:42:42 -07:00
Yanqin Jin 09ab501cb7
Improve logging for test (#9966)
In clearData() used by simulation test to clean up, we re-use the same debugID for multiple transactions,
making it less clear when grepping for the debugID. This PR assigns a new debugID for each new transaction.

Some of the commented-out tracing code are already obsolete, I updated several of them, but am not sure if
the tracing should be enabled when enabling debug transaction.

Finally, use different but similar with the same prefix error messages for different call stacks.

Co-authored-by: A.J. Beamon <aj.beamon@snowflake.com>
2023-04-18 15:25:06 -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
Xiaoxi Wang bdab07cbc8 fix detailed HealthMetrics update bug
add omitted return value
2023-04-17 12:24:14 -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
Josh Slocum 370feaa3c9
refactoring and adding future compatibility to blob range metadata (#9955)
* refactoring and adding future compatibility to blob range metadata

* formatting
2023-04-13 15:06:50 -05:00
Xiaoxi Wang 67b737b44d add getStorageStats method to DatabaseContext 2023-04-12 09:33:05 -07:00
Zhe Wu d903d0cc8d checkSafeExclusion should always create new ExclusionSafetyCheckRequest 2023-03-31 16:27:26 -07:00
A.J. Beamon 64b6a5d257 Allow boolean parameters to be nested inside of namespaces or classes 2023-03-30 15:09:59 -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
Josh Slocum c7fcf1e8f2
handling multiple in-flight rollbacks for tss change feed stream comparison (#9816) 2023-03-28 09:39:38 -05:00
He Liu 81c3cb8c50
Psm checkpoint (#9636)
* Update NativeAPI getCheckpointForRange().

* Implemented checkpoint in SS.

* clean up.

* Disabled StorageServerCheckpointTest.

* Serialized checkpoint creation and deletion.

Simplified checkpoint GC, via deleting CheckpointMetaData::dir.

* Fixed PhysicalShardMove test. Where fetchCheckpoint target range is misset.

* Minor improvements on CheckpointMetaData and DataMoveMetaData.

* fmt.

* Optimized PhysicalShardMove test

cleanup.

* dismiss operation_obsolete, and throw actor_cancelled.

* fmt.

* Resolved commments.
2023-03-21 09:14:10 -07:00
Steve Atherton 216d0be2cf
Add processID, networkAddress, and locality to layer status JSON for Backup Agents. (#9736)
* Add processID, networkAddress, and locality to layer status JSON for Backup Agents.

* Backup/dr agent determines network address to report in Layer Status only once, when the status updater loop begins, since it is a blocking call which connects to the cluster.  And lots of code cleanup.
2023-03-17 18:07:03 -07:00
Josh Slocum 52c0dc56cc fixing 2 bugs related to high delta file waitCommitted latency 2023-03-15 08:39:42 -05:00
Hui Liu c43f8b3fdc
Refactor - introduce BlobRestoreController for APIs to manage restore state (#9616) 2023-03-08 07:50:30 -08:00
Chaoguang Lin 7273723a43
Add the hotrange fdbcli command (#9570)
* Add the hotrange fdbcli command

* Remove the unnecessary state

* Add the doc about the hotrange command
2023-03-06 14:46:52 -08:00
Josh Slocum 40ed365303 fixing checkBlobSubRange to not increase version every retry 2023-03-02 09:34:55 -06:00
Jingyu Zhou a350a929b9
Merge pull request #9494 from sfc-gh-jslocum/bg_cp_improvements
addressing review comments and fixmes in bg commit proxy code
2023-02-28 12:30:58 -08: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
A.J. Beamon 469e77158f Add metacluster support for tenant locking 2023-02-27 16:53:13 -08:00
Josh Slocum 716a9c3817 addressing review comments and fixmes in bg commit proxy code 2023-02-27 10:51:47 -06:00
Vaidas Gasiunas ba726fac87 Replace hardcoded API version checks for 720 and 730 2023-02-27 16:18:01 +01:00
Josh Slocum 6187811f71
Reworking getBlobGranuleRanges to also use commit proxy rpc for authz, and adding test (#9470) 2023-02-24 17:15:32 -06:00
Markus Pilman 8695fc15fc Merge remote-tracking branch 'origin/main' into features/tenant-lock2 2023-02-22 13:12:23 -07:00
Steve Atherton 23df46773d
Merge pull request #9422 from sfc-gh-satherton/client-read-options
Add transaction option definitions for read priority and read cache
2023-02-22 09:00:25 -08:00
Josh Slocum bf97c3dbce
adding java tenant blob management test and fixing bug it found (#9428) 2023-02-22 10:52:26 -06:00
Steve Atherton a21b2fe9f9 Simplified read priority option to three separate options for normal/low/high priority. 2023-02-21 22:48:38 -08:00
Steve Atherton 5969616af8 Merge commit '6de85e7cd8e9dd74a571de9e04679e669bcbb5b6' into client-read-options 2023-02-21 20:46:20 -08:00
Markus Pilman 15d8548c0e Merge remote-tracking branch 'origin/main' into features/tenant-lock2
# Conflicts:
#	fdbserver/ApplyMetadataMutation.cpp
#	fdbserver/storageserver.actor.cpp
2023-02-21 13:39:35 -07:00
Josh Slocum 958f3b531b
Plumbing blob worker mapping through commit proxy like storage server (#9401)
* Plumbing blob worker mapping through commit proxy like storage server mapping

* review comments

* formatting
2023-02-21 13:21:44 -06:00
Steve Atherton 246fd1dd4e Remove auto cache option since there is no meaningful implementation of this yet. Change places using trState in a native Transaction to set cache mode or Low/Normal/High priority to use the new transaction options instead. 2023-02-21 02:50:30 -08:00
Steve Atherton 9bf28899d4 Add transaction option definitions for read priority and read server side cache mode. 2023-02-21 00:54:35 -08:00
sfc-gh-tclinkenbeard 398079db3a Merge remote-tracking branch 'origin/main' into expose-tag-throttled-duration 2023-02-20 17:54:06 -08:00
Josh Slocum bfb3ffc509
added c and java apis for granule flush (#9412) 2023-02-20 10:28:11 -06:00
sfc-gh-tclinkenbeard 1aef6cb5f7 Merge remote-tracking branch 'origin/main' into expose-tag-throttled-duration 2023-02-17 20:41:59 -08:00
Josh Slocum 6c2fb13173
adding wait parameter to blobbify api (#9360)
* adding wait parameter to blobbify api

* formatting

* fixing comment style

* fixing bug and adding debugging

* adding blob ranges unit test

* testing both blobbify cases in cancel

* formatting

* switch to explicit blocking api instead of boolean flag

* remove comments

* format
2023-02-17 12:20:53 -06:00
Junhyun Shim d9c126a2d9
Introduce WipedString for Arena block holding AuthZ tokens (#9381)
* Enable secure allocation mode in Arena

This mode allows zeroing out blocks holding sensitive data after use

* Introduce WipedString to all token-holding memory

Also introduce a option flag "sensitive"

* Make pointer equivalency a hard requirement for non-ASAN builds

So that we can detect when Arena/malloc/memory-wipe behavior changes
2023-02-16 10:44:32 +01:00
Markus Pilman 3017e15448 Merge remote-tracking branch 'origin/main' into features/tenant-lock2
# Conflicts:
#	fdbclient/include/fdbclient/TenantManagement.actor.h
#	fdbserver/storageserver.actor.cpp
#	fdbserver/workloads/TenantManagementWorkload.actor.cpp
2023-02-13 11:43:07 +01:00
Josh Slocum 1e5bac6238
fixing fault injection stalling change feed fetch (#9316) 2023-02-08 15:49:56 -06:00
Ankita Kejriwal b9630e57d9
Merge pull request #9291 from sfc-gh-akejriwal/debug2
Update storage metrics functions to use the version at which the tenant was read
2023-02-08 11:33:33 -08:00
sfc-gh-tclinkenbeard 09ad864eb5 Merge remote-tracking branch 'origin/main' into expose-tag-throttled-duration 2023-02-08 11:25:14 -08:00
Junhyun Shim d32d3dd085 Make token option NOT survive transaction hard resets 2023-02-08 18:12:22 +01:00
Junhyun Shim be225acd2a Merge remote-tracking branch 'origin/main' into authz-tenant-name-to-tenant-id 2023-02-06 23:13:43 +01:00
Junhyun Shim 6993e391f2 Extend authz test to include with/without GRV caching and forced MVC 2023-02-06 13:18:10 +01:00
Markus Pilman 1fb3c33b3f Merge remote-tracking branch 'origin/main' into features/tenant-lock2
# Conflicts:
#	fdbserver/CommitProxyServer.actor.cpp
2023-02-06 11:58:49 +01:00
Ankita Kejriwal 1a240a0eab Merge branch 'main' of github.com:apple/foundationdb into debug2 2023-02-03 12:26:19 -08:00
Ankita Kejriwal 913bc9114d Handle errors that can't be sent in reply; fix formatting 2023-02-02 19:05:05 -08:00
Hui Liu 774446d3a0 Support pagination for StorageServer splitMetrics API 2023-02-02 14:21:38 -08:00
Vaidas Gasiunas f8b1da8bc6
An option to initialize client tracing in setupNetwork (#9209)
* client_config_tester: use a generic mechanism to set specific network options

* trace_initialize_on_setup option to initialize client traces on network setup without local IP address

* trace_initialize_on_setup: Addressing review comments

* Restore correct formatting

* trace_initialize_on_setup: Update go bindings

* Include PID for identification into trace file names by default

* Use the same naming pattern for trace files in all configurations

* Empty commit
2023-02-02 10:00:51 +01:00
Ankita Kejriwal 9529f360ee Update storage metrics functions to use the version at which tenant was read 2023-02-01 19:44:31 -08:00
A.J. Beamon b8592c4e09
Merge pull request #9219 from sfc-gh-jfu/tenant-object-binding-tests
Add tenant getId to java/python binding tester
2023-01-31 16:22:38 -08:00
Hui Liu 6fbabab6aa Fix misc blob restore error messages 2023-01-30 13:01:27 -08:00
Markus Pilman 64c11c1f34 Implemented tenant lock and basic test 2023-01-26 15:47:39 +01:00
Jon Fu 6493da877a add method to return idfuture 2023-01-25 12:45:35 -08:00
Sreenath Bodagala fe4a839600
- Do not add fdbserver processes to the client list. (#9225)
Note: Server processes started getting reported as clients since 7.1.0
(not sure if this change in behavior was intentional or not), and this
breaks the operator upgrade logic.
2023-01-25 14:39:32 -05:00
Jingyu Zhou 27e1b76b68
Merge pull request #9226 from xis19/main-bench
Extract boost/asio.hpp out from flow/network.h
2023-01-25 09:14:52 -08:00
Xiaoge Su e2cc90c18f Extract GetServerDBInfoRequest, ClientDBInfo and OpenDatabaseRequest
Wall time: 909.3
clang time: 12747.718300
2023-01-24 14:40:11 -08:00
Evan Tschannen a1bf0829a2
Encrypt change feeds (#9164)
* encrypted change feeds, still missing re-encryption of mutations which have been modified

* removed inverted filtering and reduced the number of comparisons for calculating clear intersection

* fix merge conflict

* fixed another merge conflict

* encrypt mutations which have been modified

* renamed encrypted to encryptedMutation

* fix formatting

* format nativeAPI

* format code

* more formatting fixes
2023-01-24 14:20:54 -08:00
A.J. Beamon adb8d3ec7a Fix a memory issue when getting key range locations that manifests in particular when getting range split points 2023-01-23 11:01:37 -08:00
A.J. Beamon b10d1f227b Remove tenant name from the TenantInfo object 2023-01-20 14:04:43 -08:00
A.J. Beamon d47a2ab60f
Merge pull request #9128 from sfc-gh-ajbeamon/transactions-use-tenant-object
Transactions take a tenant object rather than a tenant name
2023-01-20 12:06:36 -08:00
He Liu ec6716ff2e
Restore kv (#9030)
* Allow multiple keyranges in CheckpointRequest.
Include DataMove ID in CheckpointMetaData.

* Use UID dataMoveId instead of Optional<UID>.

* Implemented ShardedRocks::checkpoint().

* Implementing createCheckpoint().

* Attempted to change getCheckpointMetaData*() for a single keyrange.

* Added getCheckpointMetaDataForRange.

* Minor fixes for NativeAPI.actor.cpp.

* Replace UID CheckpointMetaData::ssId with std::vector<UID>
CheckpointMetaData::src;

* Implemented getCheckpointMetaData() and completed checkpoint creation
and fetch in test.

* Refactoring CheckpointRequest and CheckpointMetaData

rename `dataMoveId` as `actionId` and make it Optional.

* Fixed ctor of CheckpointMetaData.

* Implemented ShardedRocksDB::restore().

* Tested checkpoint restore, and added range check for restore, so that
the target ranges can be a subset of the checkpoint ranges.

* Added test to partially restore a checkpoint.

* Refactor: added checkpointRestore().

* Sort ranges for comparison.

* Cleanups.

* Check restore ranges are empty; Add ranges in main thread.

* Resolved comments.

* Fixed GetCheckpointMetaData range check issue.

* Refactor CheckpointReader for CF checkpoint.

* Added CheckpointAsKeyValues as a parameter for newCheckpointReader.

* PhysicalShard::restoreKvs().

* Added `ranges` in fetchCheckpoint.

* Added RocksDBCheckpointKeyValues::ranges.

* Added ICheckpointIterator and implemented for RocksDBCheckpointReader.

* Refactored OpenAction for CheckpointReader, handled failure cases.

* Use RocksDBCheckpointIterator::end() in readRange.

* Set CheckpointReader timout and other Rocks read options.

* Implementing fetchCheckpointRange().

* Added more CheckpointReader tests.

* Cleanup.

* More cleanup.

* Added fetchCheckpointRanges test.

* Implemented restore of kv-based checkpoint.

* Improved CheckpointRestore test for kv, non-kv, as well as partial
restore.

* Added test of merge.

* Fixed merge test.

* Cleanup.

* Resolved comments.

Co-authored-by: He Liu <heliu@apple.com>
2023-01-20 09:58:34 -08:00
A.J. Beamon 258198ca20 Merge branch 'main' into transactions-use-tenant-object
# Conflicts:
#	fdbclient/include/fdbclient/DatabaseContext.h
#	fdbserver/workloads/BulkLoadWithTenants.actor.cpp
2023-01-20 09:06:39 -08:00
Hui Liu 36e8e5a3bb
Merge pull request #9176 from sfc-gh-huliu/restoreversion
Restore to a previous version
2023-01-19 17:37:23 -08:00
Hui Liu c85b984c3a blobrestore to previous point of time 2023-01-19 14:45:01 -08:00
Nim Wijetunga 82c92abca2
Change Noisy Sev30s to Sev20s (#9180)
change noisy sev30 traces to sev20
2023-01-19 14:06:34 -08:00
A.J. Beamon e1d48d28bf Remove tenant name from the TenantInfo object 2023-01-13 08:58:15 -08:00
Josh Slocum 0fc5c6c1e2
tenant entry was removed, changed to fixme (#9132) 2023-01-12 18:39:22 -06:00
Josh Slocum b6450f9eaa
More ss cf perf fixes main (#9109)
* changing future version logic for change feed fetch

* Optimizing change feed data structures and accesses

* coalescing change feed request ranges for merge cursor if they're to the same team

* fixing over-read of memory mutations for change feeds

* feed filter mutations common prefix cpu optimiation

* fix formatting
2023-01-12 16:15:05 -06:00
Xiaoxi Wang 07b37245dd merge upstream/main; solve merge conflicts 2023-01-12 12:29:03 -08:00
A.J. Beamon f999623bb1 Add a tenant lookup interface and use it when starting transactions 2023-01-06 15:51:12 -08:00
sfc-gh-tclinkenbeard 0f14647bbf Merge remote-tracking branch 'origin/main' into expose-tag-throttled-duration 2023-01-05 08:10:49 -08:00
Xiaoxi Wang e3d09a5cbd Merge branch 'main' of https://github.com/apple/foundationdb into feature/main/tenantCheck 2023-01-04 16:16:15 -08:00
Xiaoxi Wang 8266f52dea
Merge pull request #9012 from sfc-gh-xwang/feature/main/wiggleDelay
Persist accumulated wiggle delay
2023-01-04 16:14:09 -08:00
Hui Liu e3bf79cf71 Add correctness test for blob restore 2023-01-04 11:10:34 -08:00
Xiaoxi Wang bbcb3cc018 extract KeyBackedConfig, StorageWiggleData class; solve template resolution problem; solve MV txn and native api conflict by splitting RunTransaction file 2023-01-02 23:34:39 -08:00
Xiaoxi Wang 8ff6d6c7ee merge upstream/main; solve conflicts 2022-12-17 15:57:07 -08:00
Xiaoxi Wang 61e3917d58 check tenant access in applyMetadataToCommittedTransactions 2022-12-14 13:27:50 -08:00
Xiaoxi Wang c12de23824 Merge branch 'main' of https://github.com/apple/foundationdb into feature/main/wiggleDelay 2022-12-11 14:27:22 -08:00
Jingyu Zhou fee561921a Fix assertion failure from changeFeedTSSValidator() 2022-12-10 10:02:14 -08:00
sfc-gh-tclinkenbeard 68f14f017c Fix clang 15 compiler warnings 2022-12-08 13:59:37 -08:00
Xiaoxi Wang ccc494319c perpetual wiggle key functions 2022-12-08 16:46:05 -05:00
Kevin Hoxha 3cea754ba3 metrics: Add OTEL metric definitions 2022-12-08 10:07:11 -08:00
Kevin Hoxha 188e635b2e metrics: Avoid name conflicts in MetricCollection
- In Counter constructor, make sure that we combine CounterCollection name
- In IMetric constructor, add a trace event and assertion in case of collision
- Rename ClusterRecoveryData CounterCollection name from master to ClusterRecoveryData
2022-12-08 10:07:11 -08:00
FoundationDB CI 86d6106dc1
format source code after switch to clang 15 2022-12-08 17:26:45 +00:00
Hao Fu d11b5b44e0
Remove boundaryAndExist (#8994)
* Remove boundaryAndExist

Client knows whether an entry is a boundary, and client also can
see whether the record for that entry exist by checking whether
the rangeResult is empty. This field is useless.

This field breaks backward compatibility, need to remove it.
2022-12-07 18:08:15 -08:00
Marian Dvorsky 085fce8478
Distributed tracing related improvements (#8942)
Several fixes/improvements related to distributed traces.

Remove "key" attributes and the TRACING_SPAN_ATTRIBUTES_ENABLED knob: we almost never want to log actual keys (as they can contain private data), however, we do want to use other span attributes.
In Transaction::setTransactionID, properly propagate spanContext flags, and set all copies of spancontext
2022-12-07 17:58:52 +01:00
A.J. Beamon b1fb8e8c7b Resolve merge issue by renaming namespace (combining with existing TenantAPI namespace) 2022-12-05 15:47:58 -08:00
A.J. Beamon ce4a2a55b2 Remove the usage of tenant names (mostly) from the storage server 2022-12-05 15:44:41 -08:00
Trevor Clinkenbeard 6f70fc243b
Add rare code probe annotations (#8948) 2022-12-05 09:23:47 -08:00
sfc-gh-tclinkenbeard 4b6098931c Merge remote-tracking branch 'origin/main' into expose-tag-throttled-duration 2022-12-04 08:40:04 -08:00
sfc-gh-tclinkenbeard 994fd4aa41 Remove rare annotation from some code probes 2022-12-01 09:59:08 -08:00
Xiaoge Su 7a0829a14e fixup! Remove comments 2022-11-30 14:31:09 -08:00
Xiaoge Su 98d3357c59 fixup! Reformat source 2022-11-30 14:31:09 -08:00
Xiaoge Su a0fc3685c9 fixup! Update code per comments 2022-11-30 14:31:09 -08:00
Xiaoge Su a355289d63 Remove cx->clearWatchMetadata() when connection file changed
In NativeAPI.actor.cpp, ::watch ACTOR will call cx->clearWatchMetadata()
when the connectionFileChanged event is triggered. After that, it will
create a new watch metadata for itself.

If there are multiple watches, each of them that receives the
cnnectionFileChanged will clear *all* watch data and create *one* watch
for itself. This does not makes sense. A watch should only clear the
metadata, and then create one, for itself.

cx->clearWatchMetadata() is only used there, thus removed.
2022-11-30 14:31:09 -08:00
Xiaoge Su b35d1b614e Revert "Merge pull request #8602 from apple/revert-8498-mmmm"
This reverts commit 4d789b2fd9, reversing
changes made to 9625efd5b9.
2022-11-30 14:31:09 -08:00
He Liu 3d2124df80
Checkpoint restore sharded rocks (#8758)
* Allow multiple keyranges in CheckpointRequest.
Include DataMove ID in CheckpointMetaData.

* Use UID dataMoveId instead of Optional<UID>.

* Implemented ShardedRocks::checkpoint().

* Implementing createCheckpoint().

* Attempted to change getCheckpointMetaData*() for a single keyrange.

* Added getCheckpointMetaDataForRange.

* Minor fixes for NativeAPI.actor.cpp.

* Replace UID CheckpointMetaData::ssId with std::vector<UID>
CheckpointMetaData::src;

* Implemented getCheckpointMetaData() and completed checkpoint creation
and fetch in test.

* Refactoring CheckpointRequest and CheckpointMetaData

rename `dataMoveId` as `actionId` and make it Optional.

* Fixed ctor of CheckpointMetaData.

* Implemented ShardedRocksDB::restore().

* Tested checkpoint restore, and added range check for restore, so that
the target ranges can be a subset of the checkpoint ranges.

* Added test to partially restore a checkpoint.

* Refactor: added checkpointRestore().

* Sort ranges for comparison.

* Cleanups.

* Check restore ranges are empty; Add ranges in main thread.

* Resolved comments.

* Fixed GetCheckpointMetaData range check issue.

* Fixed error description.

Co-authored-by: He Liu <heliu@apple.com>
2022-11-30 08:22:14 -08:00
Dennis Zhou f10247aa25
blob: purge range fix (#8867)
* blob: adjacent purge unit test

Ensure [A, B), [B, C) can be purged independently.

* blob: fix purge alignment condition

We only need to check if the first range starts before the end.
Additionally, an empty range is problematic if passed to getRange() and
we're expecting additional values past the end of the range.
2022-11-21 12:26:19 -06:00
sfc-gh-tclinkenbeard 453f3f44c6 Merge remote-tracking branch 'origin/main' into expose-tag-throttled-duration 2022-11-21 09:17:48 -08:00
Lukas Joswiak 750669c9d8 Remove unnecessary buggify 2022-11-21 09:03:22 -08:00
Lukas Joswiak 7d73d52a91 Enable tracing in simulation
This will help test the flow of span IDs from the client all the way to
the storage servers.
2022-11-21 09:03:22 -08:00
sfc-gh-tclinkenbeard 3c97f43138 Change Histogram::Unit::microseconds to milliseconds 2022-11-21 08:03:56 -08:00
Hui Liu de8285f11d
Merge pull request #8834 from sfc-gh-huliu/status
Show blob restore in fdbcli status command
2022-11-18 16:03:30 -08:00
Hui Liu 2e62822183 Show blob restore in fdbcli status command 2022-11-17 14:22:59 -08:00
Steve Atherton 8e8c4b4489
Merge pull request #8170 from sfc-gh-sgwydir/ddsketch
Use DDSketch for sample data
2022-11-17 10:38:12 -08:00
Ankita Kejriwal 3036f2458f
Merge pull request #8803 from sfc-gh-akejriwal/commitproxies
Add a transaction option to bypass storage quota enforcement
2022-11-15 15:22:11 -08:00
sfc-gh-tclinkenbeard 82db9415fb Add const qualifier to more methods
This commit mainly targets get* and is* methods
2022-11-15 14:57:32 -08:00
sfc-gh-tclinkenbeard ec615181ce Mark several more methods const 2022-11-15 14:57:32 -08:00
sfc-gh-tclinkenbeard c03f60c618 Update rare code probe annotations 2022-11-15 13:21:25 -08:00
Ankita Kejriwal 05c914d85f Incorporate code review suggestions 2022-11-14 13:06:27 -08:00
Kevin Hoxha 47a8cebfb3 ddsketch: Make sure that all ctors use 0 < error < 1 2022-11-14 11:41:06 -08:00
sfc-gh-tclinkenbeard 2bbf823b24 Implement Transaction::getTagThrottledDuration 2022-11-13 14:39:22 -08:00
sfc-gh-tclinkenbeard 7fc85d86b4 Add fdb_transaction_get_tag_throttled_duration function to C bindings 2022-11-13 11:22:57 -08:00
Sam Gwydir 7f33b0fa70 clang-format 2022-11-12 14:09:31 -08:00
Sam Gwydir 7ea42841a4 Merge remote-tracking branch 'origin/main' into ddsketch 2022-11-12 13:52:57 -08:00
Sam Gwydir 23706c957b Use DDSketch for Sample Data. 2022-11-12 13:45:46 -08:00
Ankita Kejriwal dcbe51f24e Merge branch 'main' of github.com:apple/foundationdb into commitproxies 2022-11-11 17:28:01 -08:00
Ankita Kejriwal 2e4cd67fb8 Add a transaction option to bypass storage quota enforcement.
This can be used for transactions that only delete data to allow them to
commit even if the tenant group is over its storage quota.
2022-11-11 16:54:35 -08:00