Skip to content
This repository has been archived by the owner on May 10, 2022. It is now read-only.

feat: forbid large-size-value written to pegasus server #95

Merged
merged 21 commits into from
Apr 28, 2020

Conversation

foreverneverer
Copy link
Contributor

@foreverneverer foreverneverer commented Mar 17, 2020

Related PR: XiaoMi/rdsn#414. This PR expect to forbid it at client side.

New config in pegasus.properties:

enable_write_limit = <true | false>

@neverchanje
Copy link

neverchanje commented Mar 20, 2020

I think it's enough to provide a simple boolean option "enableWriteSizeLimit" rather than "maxAllowedWriteSize". If there's some legacy or compatibility problem, the user can disable it and fix the write-size problem in the future.

DynamoDB enforces a maximum size 400KB per item, and 16MB per batch. https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html. In terms of Pegasus, we can set limits on set and multiset separately. 400KB for set, and 1MB for multiset.
And 400KB limit for single item in multiset.

@XiaoMi XiaoMi deleted a comment from foreverneverer Apr 26, 2020
@foreverneverer foreverneverer changed the title feat: forbid large-size-value writes to Pegasus Server feat: forbid large-size-value writes to pegasus server Apr 27, 2020
@foreverneverer foreverneverer changed the title feat: forbid large-size-value writes to pegasus server feat: forbid large-size-value write to pegasus server Apr 27, 2020
@foreverneverer foreverneverer changed the title feat: forbid large-size-value write to pegasus server feat: forbid large-size-value written to pegasus server Apr 27, 2020
@neverchanje neverchanje merged commit 0d23496 into XiaoMi:thrift-0.11.0-inlined Apr 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants