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:
Praveen raj Mani
2020-04-18 13:50:56 +05:30
committed by GitHub
parent 75107d7698
commit c79358c67e
13 changed files with 34 additions and 64 deletions

View File

@@ -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