amazon-kinesis-client icon indicating copy to clipboard operation
amazon-kinesis-client copied to clipboard

Get latest counter before attempting leaseSteal to ensure leaseSteal succeeds

Open Renjuju opened this issue 4 years ago • 1 comments

Changes

  • Get current lease counter to ensure takeLeases will succeed

Tests

image

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Renjuju avatar Dec 17 '20 19:12 Renjuju

Thanks I need to go over the PR one more time. Can you do a functional test for this change and update the CR?

Yu Zeng 10:33 AM sure, just to confirm tha: does the functional test mean Testing KCL in the local?

Ashwin Giridharan 10:34 AM yeah basically you need to run two instances locally, with different worker identifier 10:34 so that one can steal leases from another (edited)

10:35 when you artificially introduce delay while fetching leases, the worker should attempt to refresh the lease (as per this PR ) and succeed stealing the lease 10:36 Also we should verify new leases are created every lease renewal i.e we should use isMarkedForSteal for only one cycle. (edited)

Yu Zeng 10:37 AM got it, thanks!

ashwing avatar Jan 03 '22 18:01 ashwing