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

Created and deleted model on one device appears as created on the other #3553

Closed
MuniekMg opened this issue Mar 6, 2024 · 5 comments
Closed
Labels
datastore Issues related to the DataStore category

Comments

@MuniekMg
Copy link
Contributor

MuniekMg commented Mar 6, 2024

Describe the bug

This is the same bug as 2982
This bug was recently closed and solved but I still can reproduce this issue

Steps To Reproduce

1. We have two phones: PhoneA and PhoneB
2. App is open only on PhoneA
3. on PhoneA add model and then remove this model (DataStore)
4. Open app on PhoneB
5. PhoneB will receive onCreate but not onDelete

Expected behavior

in step 5 phoneB should receive:

  • receive onCreate but then onDelete
    or
  • receive nothing

Amplify Framework Version

2.27.0

Amplify Categories

DataStore

Dependency manager

Swift PM

Swift version

5

CLI version

12.7.0

Xcode version

Version 15.2 (15C500b)

MuniekMg added a commit to MuniekMg/amplify-swift that referenced this issue Mar 6, 2024
@5d 5d added the datastore Issues related to the DataStore category label Mar 6, 2024
@5d
Copy link
Member

5d commented Mar 6, 2024

Hi @MuniekMg ,

Thanks for opening the issue. Could you help me confirm the model instance has been removed from the AppSync DynamoDB Table?

MuniekMg added a commit to MuniekMg/amplify-swift that referenced this issue Mar 7, 2024
MuniekMg added a commit to MuniekMg/amplify-swift that referenced this issue Mar 7, 2024
@MuniekMg
Copy link
Contributor Author

MuniekMg commented Mar 7, 2024

@5d This is how model looks in DynamoDB table:

"id","__typename","_deleted","_lastChangedAt","_ttl","_version","address","createdAt","name","owner","updatedAt"

"20DE73FE-C4D3-4E91-90AF-E52DCA7952D2",
"Space",
"true",
"1709749749259",
"1712341749",
"2",
"bbb",
"2024-03-06T18:29:04.110Z",
"aaa",
"xxxx::xxxx",
"2024-03-06T18:29:04.110Z"

@5d
Copy link
Member

5d commented Mar 7, 2024

Thanks @MuniekMg,

The record did mark as deleted. I've reviewed PR #3554. LGTM

5d added a commit that referenced this issue Mar 11, 2024
…eated on the other (#3554)

* fix(DataStore): created and deleted model on one device appears as created on the other (#3553)

* fix(DataStore): created and deleted model on one device appears as created on the other #3553

Co-authored-by: Di Wu <[email protected]>

* fix(DataStore): created and deleted model on one device appears as created on the other #3553

---------

Co-authored-by: Di Wu <[email protected]>
@5d
Copy link
Member

5d commented Mar 11, 2024

Closing this issue as the related PR has been merged and released in version 2.27.2.

@5d 5d closed this as completed Mar 11, 2024
Copy link
Contributor

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datastore Issues related to the DataStore category
Projects
None yet
Development

No branches or pull requests

2 participants