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

Only advance the shard iterator when we accept a result to return #230

Merged
merged 1 commit into from
Sep 26, 2017

Conversation

pfifer
Copy link
Contributor

@pfifer pfifer commented Sep 26, 2017

This changes the retriever strategy to only accept the shard iterator
when we have accepted a result to return. This is for the
asynchronous retriever where multiple threads may contend for the same
iterator slot. This ensures only the one selected for the response will
advance the shard iterator.

This changes the retriever strategy to only accept the shard iterator
when we have accepted a result to return.  This is for the
asynchronous retriever where multiple threads may contend for the same
iterator slot.  This ensures only the one selected for the response will
advance the shard iterator.
@pfifer pfifer added the bug label Sep 26, 2017
@pfifer pfifer merged commit 6b25de9 into awslabs:master Sep 26, 2017
@pfifer pfifer deleted the data-fetcher-accept branch September 26, 2017 20:48
pfifer added a commit to pfifer/amazon-kinesis-client that referenced this pull request Sep 26, 2017
Release 1.8.5 (September 26, 2017)
* Only advance the shard iterator for the accepted response.
  This ensures that the shard iterator is only advanced when the response is accepted.  This fixes a race condition where additional request created by the asynchronous retriever could overwrite the shard iterator of the accepted response.
  * PR awslabs#230
pfifer added a commit that referenced this pull request Sep 26, 2017
* Release 1.8.5 of the Amazon Kinesis Client for Java

Release 1.8.5 (September 26, 2017)
* Only advance the shard iterator for the accepted response.  
  This fixes a race condition in the `KinesisDataFetcher` when it's being used to make asynchronous requests.  The shard iterator is now only advanced when the retriever calls `DataFetcherResult#accept()`.
  * PR #230
  * Issue #231
sahilpalvia pushed a commit that referenced this pull request Sep 27, 2017
* Only advance the shard iterator when we accept a result to return

This changes the retriever strategy to only accept the shard iterator
when we have accepted a result to return.  This is for the
asynchronous retriever where multiple threads may contend for the same
iterator slot.  This ensures only the one selected for the response will
advance the shard iterator.

* Release 1.8.5 of the Amazon Kinesis Client for Java (#232)

* Release 1.8.5 of the Amazon Kinesis Client for Java

Release 1.8.5 (September 26, 2017)
* Only advance the shard iterator for the accepted response.  
  This fixes a race condition in the `KinesisDataFetcher` when it's being used to make asynchronous requests.  The shard iterator is now only advanced when the retriever calls `DataFetcherResult#accept()`.
  * PR #230
  * Issue #231

* Change the TerminalResult to return an empty GetRecordsResult

Changes the TerminalResult to provide an empty GetRecordsResult, which
components downstream depend on.

* Fix unit test for behavior change of TerminalResult

Got distracted, and forgot to run the unit tests.
sahilpalvia added a commit that referenced this pull request Oct 16, 2017
* Only advance the shard iterator when we accept a result to return

This changes the retriever strategy to only accept the shard iterator
when we have accepted a result to return.  This is for the
asynchronous retriever where multiple threads may contend for the same
iterator slot.  This ensures only the one selected for the response will
advance the shard iterator.

* Release 1.8.5 of the Amazon Kinesis Client for Java (#232)

* Release 1.8.5 of the Amazon Kinesis Client for Java

Release 1.8.5 (September 26, 2017)
* Only advance the shard iterator for the accepted response.  
  This fixes a race condition in the `KinesisDataFetcher` when it's being used to make asynchronous requests.  The shard iterator is now only advanced when the retriever calls `DataFetcherResult#accept()`.
  * PR #230
  * Issue #231
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