Repository navigation
Add strict mode for max points count - #5967
Conversation
| /// Estimated amount of points. | ||
| pub points_count: usize, |
There was a problem hiding this comment.
Good to mention it is estimated
| "nullable": true | ||
| }, | ||
| "max_points_count": { | ||
| "description": "Max number of points in a collection", |
There was a problem hiding this comment.
Maybe we should mention that it is an estimated number here too
| check_collection_payload_size_limit(payload_storage_size_limit_bytes, stats)?; | ||
| } | ||
|
|
||
| if let Some(points_count_limit) = point_limit { |
There was a problem hiding this comment.
Would it make sense to include the number of points the current request might add? As far as I can see we're not doing that.
Imagine we set a point limit of 1. It looks like the first request is able to insert a 100 points in one operation, and only then we're limiting point count. Or am I wrong on that?
There was a problem hiding this comment.
You are right, it would be better to not assume each request is equivalent to adding one point.
I will see what I can do here 👍
There was a problem hiding this comment.
@agourlay I'd be fine with handling that in a separate PR, so we keep this one simple and clean.
I don't deem this super critical, but rather a nice to have.
* Add strict mode for max points count * clarify estimated nature
New strict mode config for the max number of points per collection.