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

Question: state transition diagram #104

Closed
erikvdvelden opened this issue Feb 23, 2016 · 3 comments
Closed

Question: state transition diagram #104

erikvdvelden opened this issue Feb 23, 2016 · 3 comments

Comments

@erikvdvelden
Copy link

I noticed the following behaviour; when I first get the onError, then the state change to FAILURE and when I then delete the transferrecord it state again changes to CANCELED. I would have expected that FAILED was an end-state of the state machine.
It would be very good to have a state transition diagram, at least from the point of view of the SDK-user to see what actions are allowed in what state.

@fosterzhang
Copy link
Contributor

That's because TransferUtility.delete(int) always calls cancel before actually removing it from database. From what you described, it looks like you tries to delete a transfer in onError. At this moment, the transfer (Future) is probably not done yet. When delete is called, it cancels the ending transfer and changes its state to CANCELED. Probably we can add some smart logic not to cancel any transfer in a final state: PAUSED, CANCELED, FAILED, COMPLETE.

@erikvdvelden
Copy link
Author

I do not agree that PAUSED is a final state. You should be able to CANCEL a PAUSED transfer. It would just mean that you change the state to CANCELED, so you would not be able to RESUME.

@fosterzhang
Copy link
Contributor

This is improved in v2.2.13 release. Please update the SDK at https://aws.amazon.com/mobile/sdk/. Check out what is changed in the change log.

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

2 participants