Conversation
641479f to
8c1faf3
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #514 +/- ##
==========================================
+ Coverage 61.72% 62.50% +0.78%
==========================================
Files 23 24 +1
Lines 3339 3470 +131
==========================================
+ Hits 2061 2169 +108
- Misses 1278 1301 +23 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
contracts/container/contract.go
Outdated
| } | ||
|
|
||
| // PutContainerQuota sets size quota that limits all space used for storing | ||
| // objects in cID (including object replicas). Non-positive size sets no |
There was a problem hiding this comment.
negatives are senseless for now imo, i'd leave zero for reset only
There was a problem hiding this comment.
we cannot ensure this via VM's types in NEO, so either we check it or try to treat it as a normal situation. i would prefer to allow negatives, meaning any values above are ok
There was a problem hiding this comment.
passing -42 is nonsense to me. Sizes are naturally unsigned
contracts/container/contract.go
Outdated
| return q.(Quota) | ||
| } | ||
|
|
||
| // PutUserQuota sets size quota that limits all space used for storing objects |
There was a problem hiding this comment.
this can also be used out of container ownership context. For example, if I have no containers, but I upload data to someone else's. Right? lookin at implementation
There was a problem hiding this comment.
tbh initially i meant that user quota == sum of every object that was put to a container this user has. i did not think about sum of objects that the user uploaded (even to other users' containers). i am not sure it can be precisely calculated how many objects a certain user has uploaded by a node, it just does not know the other node's infos. moreover, i do not understand what user's quota means then: this user set it and this user uploads objects with this user's wallet. what is the restriction then?
There was a problem hiding this comment.
Currently user is bucket owner, we don't really have object ownership concept in NeoFS, quotas can only be tied to containers (and their owners).
There was a problem hiding this comment.
doubt this fact. If so, to upload data, any side would need to create a container
roman-khimov
left a comment
There was a problem hiding this comment.
Can we have both soft and hard limits set for a container? Do we track space occupied by account?
8c1faf3 to
e78eeed
Compare
No. |
I think @EESergey might like it. |
Can be calculated as the sum of all his containers. No direct api for now, but a few lines inside the contract, and simple side calculations if needed by nodes (i think every node will update their container understanding for all containers at once). Do you want this getter from a contract? |
The soft quota is for notification. |
10K containers.
I do. It's trivial to update yet another counter in the contract. |
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Drop Start/Stop estimations events, they are not produced anymore. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
e78eeed to
1eae1fb
Compare
1eae1fb to
f11d6f4
Compare
Provide setters for per-container and per-user limitation. Storage nodes starting from the next release are obliged to comply these limitations from the corresponding getters. User and container limitations are independent and can conflicts: in this case the lower threshold is dominant. Closes #505. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
f11d6f4 to
c7b55dc
Compare
Refs nspcc-dev/neofs-contract#514. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Add support for quotas and total container and account sizes from nspcc-dev/neofs-contract#514. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Refs nspcc-dev/neofs-contract#514. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Add support for quotas and total container and account sizes from nspcc-dev/neofs-contract#514. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Refs nspcc-dev/neofs-contract#514. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Add support for quotas and total container and account sizes from nspcc-dev/neofs-contract#514. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Refs nspcc-dev/neofs-contract#514. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Add support for quotas and total container and account sizes from nspcc-dev/neofs-contract#514. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Refs nspcc-dev/neofs-contract#514. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Add support for quotas and total container and account sizes from nspcc-dev/neofs-contract#514. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Refs nspcc-dev/neofs-contract#514. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Add support for quotas and total container and account sizes from nspcc-dev/neofs-contract#514. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Refs nspcc-dev/neofs-contract#514. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Add support for quotas and total container and account sizes from nspcc-dev/neofs-contract#514. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Refs nspcc-dev/neofs-contract#514. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Add support for quotas and total container and account sizes from nspcc-dev/neofs-contract#514. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Refs nspcc-dev/neofs-contract#514. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
No description provided.