Commit Graph

29 Commits

Author SHA1 Message Date
A.J. Beamon 908d84c893
Merge pull request #10518 from oleg68/bugfix/clang-17
Fixed compiling foundationdb with the clang 17 compiler
2023-09-13 09:59:52 -07:00
Oleg Samarin b9b4e1ebe4 Fixed formatting 2023-09-13 18:56:25 +03:00
Oleg Samarin 3c75b5d7de
Apply suggestions from code review
Co-authored-by: A.J. Beamon <aj.beamon@snowflake.com>
2023-09-13 17:18:06 +03:00
Oleg Samarin 9485191fc8 Some optimisation
(cherry picked from commit 5c6cdae3ba3570e9e376117b9b82a3cbbe0442f2)
2023-07-24 17:22:04 +03:00
Oleg Samarin 533677cb1d Fixed compiling with clang 17
(cherry picked from commit 4e218df63aa6da991cb94c9126da5b92a296e3b3)
2023-07-24 12:23:57 +03:00
Yanqin Jin 2c8b682310 Fix build issues 2023-07-05 15:49:29 -07:00
Yanqin Jin 13fac35f53 SNOW-791059 Verify no data outside tenants in REQUIRED mode (#489)
If tenant mode is REQUIRED, then we should verify that in the normal key space, no data exists outside
tenants' prefixes. This applies to data clusters (also known as partition clusters) in a metacluster and standalone clusters
with tenants.
For the management cluster of a metacluster, we should verify that no data exists outside the prefix ranges specified by `tenant/` and `metacluster/` in the normal key space.

Test plan:
devRunCorrectnessFiltered +Metacluster* +Tenant* --max-runs 100000

20230702-052847-yajin-082705d269588494. 0 Failure
devRunCorrectness --max-runs 100000

20230702-134219-yajin-e9cce7bd165e70a9. 1 Failure, unrelated to this change
2023-07-05 10:33:49 -07:00
A.J. Beamon b5497bdc3e
Merge pull request #10529 from sfc-gh-ajbeamon/test-metacluster-use-after-restore
Test use of the metacluster after a restore
2023-06-21 18:50:18 -07:00
A.J. Beamon cc68320333 Add testing that a metacluster can be used after a restore. Fix some bugs found by this related to the restore ID and tenant tombstones. 2023-06-21 08:59:22 -07:00
Yanqin Jin 75ab773819 SNOW-XXXXXX Mark a rare code probe as rare (#415) 2023-06-20 21:56:54 -07:00
Oleg Samarin 24b937f76a Fixed compiling foundationdb with the clang 17 compiler. 2023-06-19 16:49:53 +03:00
Yanqin Jin 626a8a1a5f SNOW-804199 Support restoring a cluster with a tenant in the error state (#357)
If we restore a cluster and a previously created tenant was not included in the backup, then the tenant will be marked in an error state on the management cluster. It is then up to the operator to resolve the error, generally by deleting the tenant and recreating it if needed.

There is, however, the possibility that we restored a backup that was older than we wanted, and a newer backup would have the tenant. If we tried to restore the newer backup, it would not leave the previously missing tenant in a fully usable state.

We need to have a way to deal with this case. One option is to allow us to clear the error state of a tenant, and that can be performed before (or maybe even after) the second restore.

Test plan:
Joshua test
100K ensemble: 20230613-225414-yajin-439d13ef3c6b3afd fail=0
2023-06-15 22:23:46 -07:00
A.J. Beamon eacf817b2f Add metacluster code probes 2023-05-12 12:32:24 -07:00
Yanqin Jin 01fddb7799
Add `ignore_capacity_limit` to `tenant create` (#10173)
Similar to `tenant configure`, this PR adds `ignore_capacity_limit` as an optional argument to `tenant create`.
This allows the user of fdbcli to create a new tenant on an **assigned** cluster, ignoring the tenant group capacity
on that specific cluster.
When creating a tenant with `ignore_capacity_limit`.
- If the user does not specify `assigned_cluster`, this is an error.
- If the user specifies `assigned_cluster`,
  - user does not specify `tenant_group`, then the new tenant will be an ungrouped tenant on the `assigned_cluster` ignoring the capacity limit
  - user specifies `tenant_group`,
    - if `tenant_group` does not exist, then the new tenant will be created on the assigned cluster and the tenant group will be implicitly created.
    - if `tenant_group` already exists, then additional check will make sure the tenant_group's cluster matches what the user specifies.

Test plan:
Simulation and metacluster_fdbcli_tests.py
---------

Co-authored-by: A.J. Beamon <aj.beamon@snowflake.com>
2023-05-10 13:19:32 -07:00
Yanqin Jin 8b1fe728be
Add configuration option `auto_tenant_assignment` to data clusters (#10058)
This PR adds auto_tenant_assignment option to register/configure data clusters.
Setting auto_tenant_assignment to disabled means the data cluster is a dedicated one and won't be
used for auto tenant assignment. This option is enabled by default (allowing auto tenant assignment).

Test plan:
simulation tests and metacluster_fdbcli_tests.py
---------

Co-authored-by: A.J. Beamon <aj.beamon@snowflake.com>
2023-05-01 21:58:49 -07:00
A.J. Beamon b258159d3a Change enum capitalization. Improve error reporting if we cannot read metacluster registration when fetching metacluster metrics. Improve timeliness of metacluster metrics updates. 2023-05-01 11:21:42 -07:00
A.J. Beamon 882ec9998b Add testing for the metacluster version feature to metacluster management workload. This also adds additional operations to the workload (create/decommission metacluster, lock tenant) to ensure they are covered by this testing. 2023-04-27 10:18:34 -07:00
A.J. Beamon f1cbc86b94 Add a metacluster version to the MetaclusterRegistrationEntry and validate it when loading the entry from the cluster. 2023-04-27 10:04:57 -07:00
A.J. Beamon 7ab606dfff
Merge pull request #10057 from sfc-gh-ajbeamon/function-for-creating-simulated-metacluster
Add a utility function for creating a simulated metacluster
2023-04-27 10:04:18 -07:00
A.J. Beamon eb3f495ac9 Add a utility function for creating a simulated metacluster and use it in most workloads that create metaclusters 2023-04-26 11:01:47 -07:00
Steve Atherton 46cde666a5 Merge commit '9639192a88001043a104aeef0c394e99ca5d6a6e' into keybackedrangemap 2023-04-21 13:27:15 -07:00
Jon Fu a7cf82adb2
Update fdbcli tenant list function to take tenant group filter, support JSON, and report tenant IDs (#9967)
* fix metacluster get segfault

* update fdbcli tenant list function to take tenant group filter, support JSON, and report tenant IDs

* code review changes

* code formatting

* additional code review changes

* account for empty tenant groups

* reformat error catching in fdbcli command

* refactor json output and address code review comments

* add back mistakenly removed hint

* keep hints after 4th token

* add to tenant management workload

* fix compile error

* fix test range

* add more asserts to metacluster case

* nest test condition inside if block

* adjust tenant test layout

* refactor some test files

* reorganize test workload logic
2023-04-20 16:22:47 -04:00
Steve Atherton edb071c6f2 Updated includes on newer files. 2023-04-18 22:51:27 -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
A.J. Beamon e27908556a Update the tenant group index to be a tuple of (tenant group name, tenant name, tenant ID) 2023-04-04 14:46:15 -07:00
A.J. Beamon 503ecea17e The MetaclusterManagement.actor.h file was meant to be removed as part of the metacluster refactor 2023-04-04 10:15:37 -07:00
A.J. Beamon c8f9e67822 Add a comment explaining Metacluster.h 2023-04-03 10:31:17 -07:00
A.J. Beamon 807646675c Refactor the metacluster project into smaller files, and reorganize the namespaces. Move some metacluster and tenant testing helpers into the metacluster project. 2023-03-30 16:20:09 -07:00
A.J. Beamon e61748c7d5 Move metacluster into its own directory and static library 2023-03-30 16:07:49 -07:00