Skip to content

Commit 09fe631

Browse files
committed
fix:SessionWindow和CountingWindow bufferSize初始化
1 parent b405a93 commit 09fe631

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

window/counting_window.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ func NewCountingWindow(config types.WindowConfig) (*CountingWindow, error) {
7575
}
7676

7777
// Use unified performance config to get window output buffer size
78-
bufferSize := 100 // Default value, counting windows usually have smaller buffers
78+
bufferSize := 100 // Default value
7979
if (config.PerformanceConfig != types.PerformanceConfig{}) {
80-
bufferSize = config.PerformanceConfig.BufferConfig.WindowOutputSize / 10 // Counting window uses 1/10 of buffer
80+
bufferSize = config.PerformanceConfig.BufferConfig.WindowOutputSize
8181
if bufferSize < 10 {
8282
bufferSize = 10 // Minimum value
8383
}

window/session_window.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ func NewSessionWindow(config types.WindowConfig) (*SessionWindow, error) {
9292
}
9393

9494
// Use unified performance configuration to get window output buffer size
95-
bufferSize := 100 // Default value, session windows typically have smaller buffers
95+
bufferSize := 100 // Default value
9696
if (config.PerformanceConfig != types.PerformanceConfig{}) {
97-
bufferSize = config.PerformanceConfig.BufferConfig.WindowOutputSize / 10 // Session window uses 1/10 of buffer
97+
bufferSize = config.PerformanceConfig.BufferConfig.WindowOutputSize
9898
if bufferSize < 10 {
9999
bufferSize = 10 // Minimum value
100100
}

0 commit comments

Comments
 (0)