-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid full reobservation for broadcasts from optimistic transactions.
I first attempted to solve this bug in #6419, but that approach was flawed, and we ultimately reverted it in #6493. Both of these changes happened shortly before the AC3 launch (rc.3 and rc.9, respectively). The key to this solution is that diff.fromOptimisticTransaction is only ever set by the InMemoryCache broadcast code, when we know that we've just performed an optimistic transaction, and we're broadcasting to a query watcher that requested optimistic data. The QueryInfo class receives this broadcast, and uses diff.fromOptimisticTransaction to decide whether to do a full reapplication of the chosen fetch policy by calling oq.reobserve(), or simply to deliver a single cache result by calling oq.observe().
- Loading branch information
Showing
4 changed files
with
39 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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