Skip to content

Commit d6447b2

Browse files
Update quota/mysqlqm/quota_provider.go
Co-authored-by: Roger Ng <roger2hk@gmail.com>
1 parent 65aa241 commit d6447b2

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

quota/mysqlqm/quota_provider.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ func newMySQLQuotaManager() (quota.Manager, error) {
5151
MaxUnsequencedRows: *maxUnsequencedRows,
5252
}
5353
if *mysqlQuotaMinBatchSize > 0 {
54+
if *mysqlQuotaMinBatchSize >= *maxUnsequencedRows {
55+
return nil, fmt.Errorf("mysql_quota_min_batch_size (%d) must be less than max_unsequenced_rows (%d)", *mysqlQuotaMinBatchSize, *maxUnsequencedRows)
56+
}
5457
cachedqm, err := cacheqm.NewCachedManager(qm, *mysqlQuotaMinBatchSize, *mysqlQuotaMaxCacheEntries)
5558
if err != nil {
5659
return nil, err

0 commit comments

Comments
 (0)