-
Notifications
You must be signed in to change notification settings - Fork 51
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
kvs: support configuration of max transaction count #6581
base: master
Are you sure you want to change the base?
Conversation
8868cd6
to
d245914
Compare
d245914
to
07ed829
Compare
re-pushed, removing all fence related parts of this PR, since KVS fence support is now gone |
07ed829
to
7b1939d
Compare
re-pushed, removing all the fence stuff that is no longer relevant b/c KVS fence support was removed |
a651b3a
to
5ed7562
Compare
6bcbcfe
to
3706f06
Compare
Some small set of transaction stats
the max number of ops in a transaction is 398, which means my default cap of 64K seems more than fine. I'll still monitor stats until release time, but removing WIP for now so this can be reviewed |
saw this today
max of 11K ... perhaps upping to 128K over 64K would still be good but a bit safer. |
Problem: A KVS denial of service is possible because there is no maximum on the number of operations a user can submit in a KVS transaction. For example, a KVS transaction with billions of KVS entries would lead to a severe degradation in KVS performance. Support a new KVS configuration "transaction-max-ops" that will reject KVS transaction with operations above a maximum count. The default maximum is 131072. Fixes flux-framework#6572
Problem: The new kvs transaction-max-ops configuration option is not documented. Add documentation to flux-config-kvs(5)
Problem: There is no coverage for the new kvs transaction-max-ops configuration. Add coverage in t1005-kvs-security.t.
3706f06
to
a8e4ffa
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6581 +/- ##
=======================================
Coverage 83.86% 83.86%
=======================================
Files 533 533
Lines 88683 88705 +22
=======================================
+ Hits 74375 74394 +19
- Misses 14308 14311 +3
|
Per discussion in #6125, denial-of-service attacks could be made against the KVS by very very large KVS transactions.
Support two configurations for capping the number of transactions made by users. One for each individual transaction made by a caller and one for the combined total of operations from a fence.
For the time being, I made the default 64K for the transaction cap and 1M for the fence cap.
I made this WIP only b/c those defaults may be tweaked depending on what stats we get from the prior PR #6556. I would like to merge only after we gather a bit of data, although I'd be quite shocked if we have to adjust the defaults. Edit: Or alternately, if we'd like to just get the code in, we could default the max to LLONG_MAX and lower the default at a later time.
Only other thought is I decided to return the errno E2BIG if we went across a max cap boundary. It's possible there is a superior errno for this, I picked it b/c I thought "ehhh that's not bad".