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

Subtle race condition with state vs model updates #15

Closed
adamjernst opened this issue Mar 26, 2015 · 4 comments
Closed

Subtle race condition with state vs model updates #15

adamjernst opened this issue Mar 26, 2015 · 4 comments
Assignees
Labels

Comments

@adamjernst
Copy link
Contributor

It's theoretically possible for a race condition to occur if a state update occurs between two model updates. This is so rare we haven't even noticed it when using ComponentKit in Facebook's News Feed, but we should fix it.

My plan is to implement a STM-like system for computing updates to the CKComponentLifecycleManager's state to resolve this issue.

@kastiglione
Copy link
Contributor

💎

@adamjernst
Copy link
Contributor Author

This also addresses the problem of synchronously updating the size range on rotation.

adamjernst added a commit to adamjernst/componentkit that referenced this issue Apr 23, 2015
This work is aimed at creating a new data source to replace the current implementation. The goals are:

- Fix the race conditions described in facebook#15
- Enable batching state updates to the end of the run loop as described in facebook#87
- Enable asynchronous state updates in a less hacky way
- Allow all operations on a data source to be performed synchronously or asynchronously in a safe manner (right now, insertions are always async)

These objects are merely immutable value objects or announcers, not the actual data source implementation. That will come later.
adamjernst added a commit to adamjernst/componentkit that referenced this issue Apr 23, 2015
This work is aimed at creating a new data source to replace the current implementation. The goals are:

- Fix the race conditions described in facebook#15
- Enable batching state updates to the end of the run loop as described in facebook#87
- Enable asynchronous state updates in a less hacky way
- Allow all operations on a data source to be performed synchronously or asynchronously in a safe manner (right now, insertions are always async)

These objects are merely immutable value objects or announcers, not the actual data source implementation. That will come later.
adamjernst added a commit to adamjernst/componentkit that referenced this issue Apr 23, 2015
This work is aimed at creating a new data source to replace the current implementation. The goals are:

- Fix the race conditions described in facebook#15
- Enable batching state updates to the end of the run loop as described in facebook#87
- Enable asynchronous state updates in a less hacky way
- Allow all operations on a data source to be performed synchronously or asynchronously in a safe manner (right now, insertions are always async)

These objects are merely immutable value objects or announcers, not the actual data source implementation. That will come later.
adamjernst added a commit to adamjernst/componentkit that referenced this issue Apr 27, 2015
This work is aimed at creating a new data source to replace the current implementation. The goals are:

- Fix the race conditions described in facebook#15
- Enable batching state updates to the end of the run loop as described in facebook#87
- Enable asynchronous state updates in a less hacky way
- Allow all operations on a data source to be performed synchronously or asynchronously in a safe manner (right now, insertions are always async)

These objects are merely immutable value objects or announcers, not the actual data source implementation. That will come later.
adamjernst added a commit to adamjernst/componentkit that referenced this issue Apr 27, 2015
This work is aimed at creating a new data source to replace the current implementation. The goals are:

- Fix the race conditions described in facebook#15
- Enable batching state updates to the end of the run loop as described in facebook#87
- Enable asynchronous state updates in a less hacky way
- Allow all operations on a data source to be performed synchronously or asynchronously in a safe manner (right now, insertions are always async)

These objects are merely immutable value objects or announcers, not the actual data source implementation. That will come later.
adamjernst added a commit to adamjernst/componentkit that referenced this issue Apr 29, 2015
This work is aimed at creating a new data source to replace the current implementation. The goals are:

- Fix the race conditions described in facebook#15
- Enable batching state updates to the end of the run loop as described in facebook#87
- Enable asynchronous state updates in a less hacky way
- Allow all operations on a data source to be performed synchronously or asynchronously in a safe manner (right now, insertions are always async)

These objects are merely immutable value objects or announcers, not the actual data source implementation. That will come later.
adamjernst added a commit to adamjernst/componentkit that referenced this issue May 4, 2015
This work is aimed at creating a new data source to replace the current implementation. The goals are:

- Fix the race conditions described in facebook#15
- Enable batching state updates to the end of the run loop as described in facebook#87
- Enable asynchronous state updates in a less hacky way
- Allow all operations on a data source to be performed synchronously or asynchronously in a safe manner (right now, insertions are always async)

These objects are merely immutable value objects or announcers, not the actual data source implementation. That will come later.
@ghost
Copy link

ghost commented Aug 4, 2015

Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.

@ocrickard
Copy link
Contributor

This should have been resolved by the transactional datasource, right? Let's close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants