Skip to content

[BUG] Fail compaction job when Success response job_id mismatches awaiter#6888

Open
cuiweixie wants to merge 1 commit intochroma-core:mainfrom
cuiweixie:fix/compaction-fail-on-mismatched-success-job-id
Open

[BUG] Fail compaction job when Success response job_id mismatches awaiter#6888
cuiweixie wants to merge 1 commit intochroma-core:mainfrom
cuiweixie:fix/compaction-fail-on-mismatched-success-job-id

Conversation

@cuiweixie
Copy link
Copy Markdown

Summary

When CompactionResponse::Success carries a job_id that does not match the awaiter\u2019s resp.job_id, the scheduler now calls fail_job instead of incorrectly calling succeed_job.

Context

Aligns the Success branch with the existing mismatch handling in RequireCompactionOffsetRepair.

Fixes #6887

…iter

On CompactionResponse::Success, a mismatched job_id was logged but
succeed_job was still called unconditionally. Mirror the
RequireCompactionOffsetRepair branch: call fail_job when IDs disagree,
otherwise succeed_job.
@github-actions
Copy link
Copy Markdown

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

Copy link
Copy Markdown
Contributor

@propel-code-bot propel-code-bot bot left a comment

Choose a reason for hiding this comment

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

Review found no issues; the bug fix correctly aligns job-id mismatch handling with existing behavior.

Status: No Issues Found | Risk: Low

Review Details

📁 1 files reviewed | 💬 0 comments

@propel-code-bot
Copy link
Copy Markdown
Contributor

Fix mismatched job_id handling for successful compaction responses

This PR fixes a logic bug in CompactionManager::process_completions where CompactionResponse::Success with a mismatched job_id was only logged as an error but still marked as successful via self.scheduler.succeed_job(resp.job_id). The updated logic now fails the job on mismatch and only succeeds when IDs match.

The change is limited to rust/worker/src/compactor/compaction_manager.rs and aligns Success-path mismatch behavior with existing handling in CompactionResponse::RequireCompactionOffsetRepair. This directly addresses incorrect scheduler state transitions described in issue #6887.

This summary was automatically generated by @propel-code-bot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Compaction Success path calls succeed_job despite mismatched job_id

1 participant