This is an automated email from the ASF dual-hosted git repository.
pbacsko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yunikorn-core.git
The following commit(s) were added to refs/heads/master by this push:
new 86b289ae [YUNIKORN-2756]Consider moving
event_system#defaultEventChannelSize to configs#const (#942)
86b289ae is described below
commit 86b289ae131ae0eddbe6147b35526fdafcb88ff4
Author: 0lai0 <[email protected]>
AuthorDate: Mon Aug 12 17:22:14 2024 +0200
[YUNIKORN-2756]Consider moving event_system#defaultEventChannelSize to
configs#const (#942)
Closes: #942
Signed-off-by: Peter Bacsko <[email protected]>
---
pkg/common/configs/configs.go | 1 +
pkg/events/event_system.go | 5 +----
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/pkg/common/configs/configs.go b/pkg/common/configs/configs.go
index 83e8ec8c..009e9658 100644
--- a/pkg/common/configs/configs.go
+++ b/pkg/common/configs/configs.go
@@ -45,6 +45,7 @@ const (
DefaultEventTrackingEnabled = true
DefaultEventRequestCapacity = 1000
DefaultEventRingBufferCapacity = 100000
+ DefaultEventChannelSize = 100000
DefaultMaxStreams = uint64(100)
DefaultMaxStreamsPerHost = uint64(15)
DefaultRESTResponseSize = uint64(10000)
diff --git a/pkg/events/event_system.go b/pkg/events/event_system.go
index b6fc2b26..fa3bdf68 100644
--- a/pkg/events/event_system.go
+++ b/pkg/events/event_system.go
@@ -33,9 +33,6 @@ import (
"github.com/apache/yunikorn-scheduler-interface/lib/go/si"
)
-// need to change for testing
-var defaultEventChannelSize = 100000
-
var once sync.Once
var ev EventSystem
@@ -150,7 +147,7 @@ func Init() {
buffer := newEventRingBuffer(getRingBufferCapacity())
ev = &EventSystemImpl{
Store: store,
- channel: make(chan *si.EventRecord,
defaultEventChannelSize),
+ channel: make(chan *si.EventRecord,
configs.DefaultEventChannelSize),
stop: make(chan bool),
stopped: false,
eventBuffer: buffer,
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]