Skip to content

Revert "storage: manage priority logs in housekeeping_loop"#29439

Merged
rockwotj merged 1 commit into
devfrom
revert-29382-storage_priority_compaction
Jan 28, 2026
Merged

Revert "storage: manage priority logs in housekeeping_loop"#29439
rockwotj merged 1 commit into
devfrom
revert-29382-storage_priority_compaction

Conversation

@WillemKauf

Copy link
Copy Markdown
Contributor

Reverts #29382

#29435 (comment)

^ Undefined behavior above, I'll look at re-adding this behavior when I have time to diagnose the bug.

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v25.3.x
  • v25.2.x
  • v25.1.x

Release Notes

  • none

@WillemKauf WillemKauf requested a review from dotnwat January 28, 2026 04:21
@WillemKauf WillemKauf requested a review from a team as a code owner January 28, 2026 04:21
Copilot AI review requested due to automatic review settings January 28, 2026 04:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR reverts a previous change that introduced priority partition management in the housekeeping loop. The revert was necessary due to undefined behavior discovered during code review.

Changes:

  • Removed priority partition tracking and compaction logic
  • Simplified housekeeping loop to remove preemption mechanism
  • Removed configuration option for priority compaction timeout

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/v/storage/log_manager.h Removed priority partition helper methods, preemption logic, and priority logs list
src/v/storage/log_manager.cc Removed priority compaction implementation, preemption timer logic, and restored original housekeeping flow
src/v/storage/BUILD Removed abort_source dependency
src/v/config/configuration.h Removed log_compaction_max_priority_wait_ms property
src/v/config/configuration.cc Removed log_compaction_max_priority_wait_ms configuration initialization

, segment_size_jitter(0) // For deterministic behavior in unit tests.
, compacted_segment_size(config::mock_binding<size_t>(256_MiB))
, max_compacted_segment_size(config::mock_binding<size_t>(5_GiB))

Copilot AI Jan 28, 2026

Copy link

Choose a reason for hiding this comment

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

Remove this blank line. The line was added in the revert but appears to be unintentional as it adds unnecessary whitespace after the max_compacted_segment_size initialization.

Suggested change

Copilot uses AI. Check for mistakes.
Comment on lines +385 to +387
current_log.flags |= bflags::compacted;
current_log.last_compaction = ss::lowres_clock::now();

Copilot AI Jan 28, 2026

Copy link

Choose a reason for hiding this comment

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

The compaction flags and timestamp are being set before housekeeping actually runs, which is incorrect. In the original implementation being restored, these were set after housekeeping completed successfully. Move these assignments (lines 385-386) to after the housekeeping call at line 479 to properly reflect when compaction actually completes.

Suggested change
current_log.flags |= bflags::compacted;
current_log.last_compaction = ss::lowres_clock::now();

Copilot uses AI. Check for mistakes.
dotnwat
dotnwat previously approved these changes Jan 28, 2026
@WillemKauf

Copy link
Copy Markdown
Contributor Author

#29440

@WillemKauf WillemKauf reopened this Jan 28, 2026
@rockwotj rockwotj merged commit 8a5a71e into dev Jan 28, 2026
22 checks passed
@rockwotj rockwotj deleted the revert-29382-storage_priority_compaction branch January 28, 2026 07:28
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.

4 participants