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

KinesisRecorder.submitAllRecords() loss data. #225

Closed
volic opened this issue Dec 6, 2016 · 2 comments
Closed

KinesisRecorder.submitAllRecords() loss data. #225

volic opened this issue Dec 6, 2016 · 2 comments

Comments

@volic
Copy link

volic commented Dec 6, 2016

submitAllRecords is long run method because it sends cached data to server through http connection.
When I invoke this method and internet connectivity is poor It runs more than a minute.
During this time the service had been killed by the android system and all sending data was lost.
When I checked the submitAllRecords method I noticed that you firstly remove data from cache and if it sends unsuccesfuly you return it back to the cache after some time.
Caching data is very sensetive operation and I cannot loose it during the killing of service.
Please remove cached records only when you will understand that the data send correctly or it is invalid.

public synchronized void submitAllRecords() {
 //...
   iterator.removeReadRecords();
 //...
   List<byte[]> failures = sender.sendBatch(streamName, data);
 //...
   saveRecord(bytes, streamName);
 //...
}
@wdane
Copy link
Contributor

wdane commented Jan 31, 2017

This is good feedback, this fix will be released in the next version of the Android SDK. However I cannot make a definite promise on when the next release will be.

@wdane wdane closed this as completed Jan 31, 2017
@azsolinsky
Copy link

This was fixed in the 2.3.9 release.

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

No branches or pull requests

3 participants