Commit Graph

1857 Commits

Author SHA1 Message Date
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