mirror of
https://github.com/minio/minio.git
synced 2025-11-09 21:49:46 -05:00
notification queue limit has no maxLimit (#9380)
New value defaults to 100K events by default, but users can tune this value upto any value they seem necessary. * increase the limit to maxint64 while validating
This commit is contained in:
@@ -101,9 +101,6 @@ func (a *AMQPArgs) Validate() error {
|
||||
return errors.New("queueDir path should be absolute")
|
||||
}
|
||||
}
|
||||
if a.QueueLimit > 10000 {
|
||||
return errors.New("queueLimit should not exceed 10000")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -74,9 +74,6 @@ func (a ElasticsearchArgs) Validate() error {
|
||||
if a.Index == "" {
|
||||
return errors.New("empty index value")
|
||||
}
|
||||
if a.QueueLimit > 10000 {
|
||||
return errors.New("queueLimit should not exceed 10000")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -110,9 +110,6 @@ func (k KafkaArgs) Validate() error {
|
||||
return errors.New("queueDir path should be absolute")
|
||||
}
|
||||
}
|
||||
if k.QueueLimit > 10000 {
|
||||
return errors.New("queueLimit should not exceed 10000")
|
||||
}
|
||||
if k.Version != "" {
|
||||
if _, err := sarama.ParseKafkaVersion(k.Version); err != nil {
|
||||
return err
|
||||
|
||||
@@ -99,9 +99,6 @@ func (m MQTTArgs) Validate() error {
|
||||
return errors.New("qos should be set to 1 or 2 if queueDir is set")
|
||||
}
|
||||
}
|
||||
if m.QueueLimit > 10000 {
|
||||
return errors.New("queueLimit should not exceed 10000")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -161,9 +161,6 @@ func (m MySQLArgs) Validate() error {
|
||||
return errors.New("queueDir path should be absolute")
|
||||
}
|
||||
}
|
||||
if m.QueueLimit > 10000 {
|
||||
return errors.New("queueLimit should not exceed 10000")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -136,9 +136,6 @@ func (n NATSArgs) Validate() error {
|
||||
return errors.New("queueDir path should be absolute")
|
||||
}
|
||||
}
|
||||
if n.QueueLimit > 10000 {
|
||||
return errors.New("queueLimit should not exceed 10000")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -80,9 +80,6 @@ func (n NSQArgs) Validate() error {
|
||||
return errors.New("queueDir path should be absolute")
|
||||
}
|
||||
}
|
||||
if n.QueueLimit > 10000 {
|
||||
return errors.New("queueLimit should not exceed 10000")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -159,9 +159,6 @@ func (p PostgreSQLArgs) Validate() error {
|
||||
return errors.New("queueDir path should be absolute")
|
||||
}
|
||||
}
|
||||
if p.QueueLimit > 10000 {
|
||||
return errors.New("queueLimit should not exceed 10000")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -30,8 +30,8 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
maxLimit = 10000 // Max store limit.
|
||||
eventExt = ".event"
|
||||
defaultLimit = 100000 // Default store limit.
|
||||
eventExt = ".event"
|
||||
)
|
||||
|
||||
// QueueStore - Filestore for persisting events.
|
||||
@@ -45,7 +45,7 @@ type QueueStore struct {
|
||||
// NewQueueStore - Creates an instance for QueueStore.
|
||||
func NewQueueStore(directory string, limit uint64) Store {
|
||||
if limit == 0 {
|
||||
limit = maxLimit
|
||||
limit = defaultLimit
|
||||
_, maxRLimit, err := sys.GetMaxOpenFileLimit()
|
||||
if err == nil {
|
||||
// Limit the maximum number of entries
|
||||
|
||||
@@ -89,9 +89,6 @@ func (r RedisArgs) Validate() error {
|
||||
return errors.New("queueDir path should be absolute")
|
||||
}
|
||||
}
|
||||
if r.QueueLimit > 10000 {
|
||||
return errors.New("queueLimit should not exceed 10000")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -70,9 +70,6 @@ func (w WebhookArgs) Validate() error {
|
||||
return errors.New("queueDir path should be absolute")
|
||||
}
|
||||
}
|
||||
if w.QueueLimit > maxLimit {
|
||||
return errors.New("queueLimit should not exceed 10000")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user