Commit 14f9a71
authored
Offline get() improvements. (#1133)
1. Changed MAX_WATCH_STREAM_FAILURES to 1 per conversation with @wilhuff and
@jdimond.
2. Fixed a "race" where when a get() triggered a watch stream error, we'd
restart the stream, then get() would remove its listener, and so we had no
listener left once the watch stream was "opened". Without a listen to send
we'd be stuck in Offline state (even though we should be Unknown whenever
we have no listens to send), resulting in the next get() returning data
from cache without even attempting to reach the backend.1 parent 95f3d18 commit 14f9a71
File tree
5 files changed
+28
-18
lines changed- packages/firestore
- src/remote
- test/unit/specs
5 files changed
+28
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
2 | 8 | | |
3 | 9 | | |
4 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
247 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
248 | 256 | | |
249 | 257 | | |
250 | 258 | | |
| |||
330 | 338 | | |
331 | 339 | | |
332 | 340 | | |
333 | | - | |
334 | 341 | | |
335 | 342 | | |
336 | 343 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | 31 | | |
34 | 32 | | |
35 | 33 | | |
| |||
49 | 47 | | |
50 | 48 | | |
51 | 49 | | |
52 | | - | |
53 | | - | |
| 50 | + | |
54 | 51 | | |
55 | 52 | | |
56 | 53 | | |
| |||
71 | 68 | | |
72 | 69 | | |
73 | 70 | | |
74 | | - | |
75 | | - | |
| 71 | + | |
76 | 72 | | |
77 | 73 | | |
78 | 74 | | |
| |||
83 | 79 | | |
84 | 80 | | |
85 | 81 | | |
86 | | - | |
| 82 | + | |
87 | 83 | | |
88 | 84 | | |
89 | 85 | | |
90 | | - | |
91 | 86 | | |
92 | 87 | | |
93 | 88 | | |
| |||
107 | 102 | | |
108 | 103 | | |
109 | 104 | | |
110 | | - | |
111 | | - | |
| 105 | + | |
112 | 106 | | |
113 | 107 | | |
114 | 108 | | |
| |||
136 | 130 | | |
137 | 131 | | |
138 | 132 | | |
139 | | - | |
140 | | - | |
| 133 | + | |
141 | 134 | | |
142 | 135 | | |
143 | 136 | | |
| |||
191 | 184 | | |
192 | 185 | | |
193 | 186 | | |
194 | | - | |
| 187 | + | |
195 | 188 | | |
196 | 189 | | |
197 | | - | |
198 | 190 | | |
199 | 191 | | |
200 | 192 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| |||
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| 101 | + | |
100 | 102 | | |
101 | 103 | | |
102 | 104 | | |
| |||
0 commit comments