Uh oh!
There was an error while loading. Please reload this page.
Support setting replica quota in db level - #3283
Conversation
imay
commented
Apr 9, 2020
@caiconghui |
caiconghui
commented
Apr 9, 2020
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| fullNameToDb.put(newFullDbName, db); | ||
| DatabaseInfo dbInfo = new DatabaseInfo(fullDbName, newFullDbName, -1L); | ||
| DatabaseInfo dbInfo = new DatabaseInfo(fullDbName, newFullDbName, -1L, QuotaType.DATA); |
There was a problem hiding this comment.
How about change QuotaType.DATA to null? For better understanding?
There was a problem hiding this comment.
@morningman null may cause NullPointerException, so I use QuotaType.NONE instead of null
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| public static int shortkey_max_column_count = 3; | ||
| public static int shortkey_maxsize_bytes = 36; | ||
| public static long default_db_data_quota_bytes = 1024 * 1024 * 1024 * 1024L; // 1TB | ||
| public static long default_db_replica_quota_size = 1000000; |
There was a problem hiding this comment.
The 1000000 is too small. In meituan.com, the replica number for one database has exceeded 1000000. I think your initial value 1024 * 1024 * 1024 is OK.
There was a problem hiding this comment.
Why not set -1 as default value, which means no limit?
Otherwise I'm afraid some cluster can't create table after cluster upgrade.
There was a problem hiding this comment.
OK. I will change it to original default value
There was a problem hiding this comment.
@imay 1024 * 1024 * 1024 is a large value and enough, if one table has 100000 tablets , about 10000 tables can exits in on db?
There was a problem hiding this comment.
in my point of view, quota is a necessary limit for resource usage, the resource is limited, replica quota should like data quota, not set to be -1 @imay
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This PR is to limit the replica usage, admin need to know the replica usage for every db and table, be able to set replica quota for every db. ``` ALTER DATABASE db_name SET REPLICA QUOTA quota; ```
This PR is to limit the replica usage, admin need to know the replica usage for every db and table, be able to set replica quota for every db.