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

Conflict resolution does not work after relaunch app #95

Closed
santosdaniel opened this issue Jan 8, 2019 · 6 comments
Closed

Conflict resolution does not work after relaunch app #95

santosdaniel opened this issue Jan 8, 2019 · 6 comments
Assignees
Labels
bug Something isn't working pending-response Issue is pending response from the issue requestor

Comments

@santosdaniel
Copy link

santosdaniel commented Jan 8, 2019

For ignoring a conflict in the client side we need to call more that handler.fail(recordIdentifier) ?
I am trying to implement a conflict revolver in my android client, in my case there is the possibility the of two messages have the same identifier since there are periods which my users are going to be offline.
If my conflict resolver is called without restarting the application the conflict resolver works just fine.
If there is a restart of the application the mutation queue gets stuck.

To Reproduce
Steps to reproduce the behavior:

  1. Using two devices disable the network of one them
  2. In the device online send create one entity with id = '1'
  3. With device offline try to send an entity with id='1' (Putting the mutation in the queue)
  4. In the device offline force the application that uses the sdk to stop.
  5. In the device offline relaunch the application using the sdk.
  6. In the device offline put it online again.
  7. The conflict revolver is going to be called if configured 'AWSAppSyncClient.builder().conflictResolver(myConflictResolver)'

In this conflict revolver should have something like ' handler.fail(recordIdentifier)' or I need to
call anyother method to not get my queue stuck ?

Environment:

  • AppSync SDK Version: 2.7.3

Device Information:

  • Samsung gallaxy tab
@scb01 scb01 self-assigned this Jan 8, 2019
@scb01
Copy link
Contributor

scb01 commented Jan 8, 2019

@santosdaniel

Sorry to hear that you are running into issues. I will look into this and get back to you.

@scb01 scb01 added the bug Something isn't working label Jan 8, 2019
@santosdaniel
Copy link
Author

Additional info: As far as I could see in my case the method getFirstInQueue() of the class PersistentOfflineMutationManager is returning always the same element to be sent to the network.

This method getFirstInQueue() uses the list persistentOfflineMutationObjectList which does not get clean by the call to handler.fail(recordIdentifier),
This is why I first thought that was a bad use of the Api of my part or if I need it to call another method to remove the element from this list persistentOfflineMutationObjectList.

@scb01
Copy link
Contributor

scb01 commented Jan 9, 2019

@santosdaniel
I have been able to reproduce this on my side. I will be working on a fix and will provide an update here once I have more information

@scb01
Copy link
Contributor

scb01 commented Jan 15, 2019

@santosdaniel

Version 2.7.5 of the SDK contains fixes for this issue. Please try it out and let me know how it goes.

@scb01 scb01 added the pending-response Issue is pending response from the issue requestor label Jan 15, 2019
@ukevgen
Copy link

ukevgen commented Jan 18, 2019

@cbommas seems in 2.7.5 doesn't work properlyy #102

@scb01
Copy link
Contributor

scb01 commented Jan 21, 2019

@ukevgen
Lets follow that issue on #102. I will go ahead and close out this issue with the conflict management as I got confirmation on #98 that the issue was resolved.

@scb01 scb01 closed this as completed Jan 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending-response Issue is pending response from the issue requestor
Projects
None yet
Development

No branches or pull requests

4 participants