Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ahrav committed Jan 31, 2024
1 parent 929f8b4 commit c42ee4f
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions pkg/engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,16 +335,14 @@ func (e *Engine) initialize(ctx context.Context, options ...Option) error {
return fmt.Errorf("failed to initialize LRU cache: %w", err)
}
const (
// detectableChunksChanMultiplier is set to 100 to accommodate a high number of concurrent worker goroutines.
// This multiplier ensures that the detectableChunksChan channel has sufficient buffer capacity to hold messages
// from multiple workers without blocking. A large buffer helps in maintaining smooth flow in the pipeline,
// especially when workers are producing data at a faster rate than it can be consumed. The specific value is
// chosen based on expected concurrency levels and the rate of message production.
// detectableChunksChanMultiplier is set to accommodate a high number of concurrent worker goroutines.
// This multiplier ensures that the detectableChunksChan channel has sufficient buffer capacity
// to hold messages from multiple workers without blocking. A large buffer helps accommodate for
// the fact workers are producing data at a faster rate than it can be consumed.
detectableChunksChanMultiplier = 100
// reverifiableChunksChanMultiplier is set to 25, providing a smaller buffer compared to detectableChunksChanMultiplier.
// This reflects the anticipated lower volume of data that needs re-verification. The buffer size is a trade-off
// between memory usage and the need to prevent blocking in worker goroutines. It is set based on the expected
// workload for re-verification processes, which is typically less intensive than the initial detection workload.
// reverifiableChunksChanMultiplier uses a smaller buffer compared to detectableChunksChanMultiplier.
// This reflects the anticipated lower volume of data that needs re-verification.
// The buffer size is a trade-off between memory usage and the need to prevent blocking.
reverifiableChunksChanMultiplier = 25
)

Expand Down

0 comments on commit c42ee4f

Please sign in to comment.