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

incorrect version from navigator.openEntry #1357

Open
mzh-z opened this issue Sep 1, 2022 · 3 comments
Open

incorrect version from navigator.openEntry #1357

mzh-z opened this issue Sep 1, 2022 · 3 comments

Comments

@mzh-z
Copy link

mzh-z commented Sep 1, 2022

Hello,

I'm calling navigator like that:
let response = await this.sdk.navigator.openEntry(id, {slideIn: { waitForClose: true }} );
and though the fields of entry in response always contain the last updates, the version is sometimes stale (couldn't find any pattern in correct/incorrect responses).

lib version: 4.12.0

@andipaetzold
Copy link
Contributor

Hey

just to clarify, the data in response has the correct field values but sys.version is outdated?

@mzh-z
Copy link
Author

mzh-z commented Sep 8, 2022

Hello, yes the data is correct and sys.version is stale.

I've found what's the reason for it - turned out after navigation window is closed no additional request is made. That means the entry that was present on UI is returned as a result. But the version is updated asynchronously. So it can happen that you've changed the field, go back and get the data changed but not version. Not very much pleasant behaviour, cause as a result you get an entity in inconsistent state. But not sure it can be done better in that case - at least it's always an option to re-request the version on client side or try to increase it on update in case of VersionMistmach error.

@andipaetzold
Copy link
Contributor

andipaetzold commented Sep 8, 2022

A VersionMismatch also indicates that the data is saved properly but we just don't return the updated version...

I'll forward it internally, thank you! (EXT-4531)

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