You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As seen in #26325, invalidating the cache during an optimistic update may cause a GET request in the next tick. When that GET is resolved, it will update the state. If the timing lines up badly, it will overwrite the results of the POST. This PR flips the invalidateCache argument to false to prevent this race condition from happening. The GET will be triggered only after the POST/PUT request is finished (successfully or not).
adamziel
changed the title
Do not invalidate the record during the optimistic update
Do not invalidate the entity record during optimistic update
Nov 2, 2020
adamziel
changed the title
Do not invalidate the entity record during optimistic update
Do not invalidate the entity record during optimistic update in saveEntityRecord
Nov 2, 2020
The only failure is an unrelated ["Failed to inject axe-core into frame (about:blank)"],["Failed to inject axe-core into frame (about:blank)"] (#26527).
@youknowriad I think it improves the situation, not necessarily fixes it. I'll comment on that issue after testing this one together with #26575 and #26387
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
As seen in #26325, invalidating the cache during an optimistic update may cause a GET request in the next tick. When that GET is resolved, it will update the state. If the timing lines up badly, it will overwrite the results of the POST. This PR flips the
invalidateCacheargument tofalseto prevent this race condition from happening. The GET will be triggered only after the POST/PUT request is finished (successfully or not).Related to #26325
How has this been tested?
Screenshots
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: