Skip to content
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

Fix for the lease losses in the PrefetchCache and AsyncGetRecordsStrategy caused due to ExpiredIteratorException #263

Merged
merged 1 commit into from
Nov 8, 2017

Conversation

sahilpalvia
Copy link
Contributor

This commit includes

  • Fix for ExpiredIteratorException in AsyncGetRecordsStrategy and PrefetchGetRecordsCache.
  • PrefetchGetRecordsCache can restart the iterator, which fetches a new iterator.
  • Unit tests for the changes.

…tegy caused due to ExpiredIteratorException.
Copy link
Contributor

@pfifer pfifer left a comment

Choose a reason for hiding this comment

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

Looks good.

@@ -162,6 +171,14 @@ public void run() {
prefetchCounters.added(processRecordsInput);
} catch (InterruptedException e) {
log.info("Thread was interrupted, indicating shutdown was called on the cache.");
} catch (ExpiredIteratorException e) {
log.info(String.format("ShardId %s: getRecords threw ExpiredIteratorException - restarting"
+ " after greatest seqNum passed to customer", shardId), e);
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't actually true, it restarting from the last accepted sequence number. That may be in the queue waiting to be processed.

@pfifer pfifer merged commit 5c3ff2b into awslabs:master Nov 8, 2017
@sahilpalvia sahilpalvia deleted the prefetch-expirediterator-fix branch November 8, 2017 21:10
@pfifer pfifer added this to the v1.8.8 milestone Nov 8, 2017
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.

2 participants