Skip to content

feat: Add new logging for compaction level 5 and remove bug with holdoff #26488

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 2, 2025

Conversation

devanbenz
Copy link

@devanbenz devanbenz commented Jun 2, 2025

Previously

// StartOptHoldOff will create a hold off timer for OptimizedCompaction
func (e *Engine) StartOptHoldOff(holdOffDurationCheck time.Duration, optHoldoffStart time.Time, optHoldoffDuration time.Duration) {
	startOptHoldoff := func(dur time.Duration) {
		optHoldoffStart = time.Now()
		optHoldoffDuration = dur
		e.logger.Info("optimize compaction holdoff timer started", logger.Shard(e.id), zap.Duration("duration", optHoldoffDuration), zap.Time("endTime", optHoldoffStart.Add(optHoldoffDuration)))
	}
	startOptHoldoff(holdOffDurationCheck)
}

was not passing the data by reference which meant we were never modifying the optHoldoffDuration and optHoldoffStart vars.

This PR also adds additional logging to Optimized level 5 compactions to clear up a little bit of confusion around log messages.

@devanbenz devanbenz requested a review from davidby-influx June 2, 2025 22:42
@devanbenz devanbenz changed the title feat: Add new logging for compaction level 5 and remove bug with opt … feat: Add new logging for compaction level 5 and remove bug with holdoff Jun 2, 2025
@devanbenz devanbenz self-assigned this Jun 2, 2025
Copy link
Contributor

@davidby-influx davidby-influx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@devanbenz devanbenz merged commit 7437f27 into master-1.x Jun 2, 2025
11 checks passed
@devanbenz devanbenz deleted the db/optimize-logging-lambda branch June 2, 2025 22:52
devanbenz added a commit that referenced this pull request Jun 3, 2025
…holdoff time (#26488)

Previously

```go
// StartOptHoldOff will create a hold off timer for OptimizedCompaction
func (e *Engine) StartOptHoldOff(holdOffDurationCheck time.Duration, optHoldoffStart time.Time, optHoldoffDuration time.Duration) {
	startOptHoldoff := func(dur time.Duration) {
		optHoldoffStart = time.Now()
		optHoldoffDuration = dur
		e.logger.Info("optimize compaction holdoff timer started", logger.Shard(e.id), zap.Duration("duration", optHoldoffDuration), zap.Time("endTime", optHoldoffStart.Add(optHoldoffDuration)))
	}
	startOptHoldoff(holdOffDurationCheck)
}
```
was not passing the data by reference which meant we were never modifying the `optHoldoffDuration` and `optHoldoffStart` vars.

This PR also adds additional logging to Optimized level 5 compactions to clear up a little bit of confusion around log messages.

(cherry picked from commit 7437f27)
devanbenz added a commit that referenced this pull request Jun 3, 2025
…holdoff time (#26488) (#26490)

Previously

```go
// StartOptHoldOff will create a hold off timer for OptimizedCompaction
func (e *Engine) StartOptHoldOff(holdOffDurationCheck time.Duration, optHoldoffStart time.Time, optHoldoffDuration time.Duration) {
	startOptHoldoff := func(dur time.Duration) {
		optHoldoffStart = time.Now()
		optHoldoffDuration = dur
		e.logger.Info("optimize compaction holdoff timer started", logger.Shard(e.id), zap.Duration("duration", optHoldoffDuration), zap.Time("endTime", optHoldoffStart.Add(optHoldoffDuration)))
	}
	startOptHoldoff(holdOffDurationCheck)
}
```
was not passing the data by reference which meant we were never modifying the `optHoldoffDuration` and `optHoldoffStart` vars.

This PR also adds additional logging to Optimized level 5 compactions to clear up a little bit of confusion around log messages.

(cherry picked from commit 7437f27)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants