Skip to content

Conversation

tvaron3
Copy link
Member

@tvaron3 tvaron3 commented Oct 17, 2025

Description

See jeet1995#25

@Copilot Copilot AI review requested due to automatic review settings October 17, 2025 15:24
@tvaron3 tvaron3 requested review from a team as code owners October 17, 2025 15:24
Copy link
Contributor

@Copilot Copilot AI left a comment

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 implements a defensive lease renewal mechanism for the change feed processor. The change prevents unnecessary lease renewals when a partition processor has not successfully processed any batches within a verification window (25x the lease renewal interval), allowing other workers to steal the lease.

Key changes:

  • Added time-based verification logic to track the last successful batch processing timestamp
  • Implemented a shouldContinue method that checks if the processor should continue renewing leases based on processing activity
  • Added comprehensive unit tests to validate the new lease renewal behavior

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
pkversion/PartitionSupervisorImpl.java Added defensive lease renewal logic with time-based verification
epkversion/PartitionSupervisorImpl.java Mirrored defensive lease renewal logic for epk version
pkversion/PartitionProcessorImpl.java Added timestamp tracking for last processed batch
epkversion/PartitionProcessorImpl.java Mirrored timestamp tracking for epk version
pkversion/PartitionProcessor.java Added interface method to retrieve last processed time
epkversion/PartitionProcessor.java Mirrored interface method for epk version
LeaseRenewer.java Added interface method to expose lease renewal interval
pkversion/LeaseRenewerImpl.java Implemented getter for lease renewal interval
epkversion/LeaseRenewerImpl.java Mirrored implementation for epk version
pkversion/PartitionSupervisorImplTests.java Added comprehensive unit tests for defensive lease renewal behavior
epkversion/PartitionSupervisorImplTests.java Mirrored test coverage for epk version
pkversion/PartitionProcessorImplTests.java Added test to verify timestamp updates during batch processing
epkversion/PartitionProcessorImplTests.java Mirrored timestamp test for epk version

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant