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: Store local scope need support sync #25

Open
bluejfox opened this issue Mar 21, 2022 · 0 comments
Open

Feature: Store local scope need support sync #25

bluejfox opened this issue Mar 21, 2022 · 0 comments
Assignees

Comments

@bluejfox
Copy link
Collaborator

bluejfox commented Mar 21, 2022

现状及问题:
目前Store module的同步机制:
1.module mutation执行时同步mutation数据至localstorage
2.只在初始化时同步localstorage数据至store
多tab页场景下,存在数据不一致的问题
需增加localstorage监听逻辑同步数据至store
影响范围:
实现时需考虑的问题点:
数据冲突,不同tab页内对同一个数据进行写入
A写入,B同步
A&C同时写入,B同步,后者胜
A写入,B同步,B写入,A同步 -> B同步和写入在同一时间点
如何实现原子性?
无法解决的话如何避免这个问题?

@bluejfox bluejfox self-assigned this Mar 21, 2022
@bluejfox bluejfox changed the title Feature: Store Local Scope need support sync Feature: Store local scope need support sync Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant