Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: namespace quota #13516

Closed
wants to merge 12 commits into from
Closed

Conversation

vivekpatani
Copy link
Contributor

To add functionality surroundind the namespace quotas.
Ability to set, delete, list, and get quotas.
Framework to interact with core etcd ops.

This PR is against master, a related PR against branch-3.4 is made here: #13486

Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.

@JmPotato
Copy link
Contributor

JmPotato commented Dec 3, 2021

Thx for your work! But I'm wondering that this big change is hard to review, so any splitting would be helpful 😢.

@vivekpatani
Copy link
Contributor Author

@JmPotato Hi sure, let me logically chunk them out, thank you. I will update you once I break them apart.

@vivekpatani vivekpatani force-pushed the 3.5/namespace-quota branch 2 times, most recently from 0fc4dba to 6d6f59d Compare February 16, 2022 04:04
@codecov-commenter
Copy link

codecov-commenter commented Feb 16, 2022

Codecov Report

Merging #13516 (1643634) into main (1597219) will decrease coverage by 1.09%.
The diff coverage is 68.39%.

❗ Current head 1643634 differs from pull request most recent head bb39cec. Consider uploading reports for the commit bb39cec to get more accurate results

@@            Coverage Diff             @@
##             main   #13516      +/-   ##
==========================================
- Coverage   75.11%   74.01%   -1.10%     
==========================================
  Files         448      458      +10     
  Lines       37181    37909     +728     
==========================================
+ Hits        27929    28059     +130     
- Misses       7484     8022     +538     
- Partials     1768     1828      +60     
Flag Coverage Δ
all 74.01% <68.39%> (-1.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
api/v3rpc/rpctypes/error.go 90.47% <ø> (ø)
etcdctl/ctlv3/command/printer.go 22.48% <0.00%> (-0.72%) ⬇️
etcdctl/ctlv3/command/printer_simple.go 57.55% <0.00%> (-3.56%) ⬇️
server/config/config.go 79.76% <ø> (ø)
server/etcdserver/api/v3rpc/util.go 74.19% <ø> (ø)
server/storage/mvcc/kv.go 40.00% <ø> (ø)
server/storage/schema/bucket.go 88.88% <ø> (ø)
client/v3/namespacequota.go 15.25% <15.25%> (ø)
...grpcproxy/adapter/namespacequota_client_adapter.go 20.00% <20.00%> (ø)
client/v3/retry.go 71.65% <27.27%> (-4.21%) ⬇️
... and 74 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1597219...bb39cec. Read the comment docs.

@vivekpatani vivekpatani force-pushed the 3.5/namespace-quota branch 2 times, most recently from 3fde36d to 71a0489 Compare February 17, 2022 03:35
@vivekpatani
Copy link
Contributor Author

@JmPotato @wenjiaswe @ptabor @serathius @wojtek-t @hexfusion @jingyih rebased the PR, bumping again. Sorry it took so long.

I've tried to breakdown the PR into more logical components so that it builds up in the following fashion:

  1. Added/Generated most of the proto files needed for this feature.
  2. NamespaceQuotaEnforcement controls if the quota needs to be in soft, hard, or disabled mode.
  3. Add metrics required to understand how quotas are being used and affect etcd, added go.mod changes, and creating an index required to CRUD quotas.
  4. Add necessary functions to recover quotas when a member/cluster starts/restarts/join
  5. Add the central part of the quota, the namespace quota manager. This has most of functionality of quotas.
  6. Add relevant errors that may occur when dealing with quotas.
  7. Server changes to accommodate quota operations, and subsequent raft changes.
  8. Testing
  9. Client side changes to accommodate quotas.
  10. Minor fixes
  11. gRPC proxy changes

Please feel free to reach out with any questions, feedback is welcome. Thank you.

@vivekpatani vivekpatani force-pushed the 3.5/namespace-quota branch 2 times, most recently from 1643634 to bb39cec Compare May 4, 2022 03:03
@vivekpatani
Copy link
Contributor Author

As discussed in meeting on June 2, 2022, this will be reviewed at a later time, potentially 3.7.x/3.8.x.

@vivekpatani vivekpatani closed this Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants