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

Feature: update data optimistically but more safely #231

Open
SkyeYoung opened this issue Jan 25, 2025 · 0 comments
Open

Feature: update data optimistically but more safely #231

SkyeYoung opened this issue Jan 25, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@SkyeYoung
Copy link

Description

Hi, I noticed an interesting new feature was added in a recent PR #229 , but I think there are some areas where the process could be optimized. So I created a process that I think might be better, pls see the image below.

Image

The current process seems to only use the cached remote state file, which behavior ignores changes committed by others during the time you issue them, causing your data to overwrite other people's submitted modifications.

In the modified process, we simultaneously perform diff and get new data again. If the new data is the same as the local one, then we can directly sync the diffed data. If it is different, we can use the newly obtained data to diff again and perform sync, which is consistent with the original logic.

Maybe this logic still has its shortcomings or is a bit too taken for granted. Suggestions and comments are welcome. (For convenience, I leave the address of the above image so that anyone can copy and edit it)

If I had the time and energy, I would help to realize this logic. 😺

@SkyeYoung SkyeYoung added the enhancement New feature or request label Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants