Repository navigation
Commit 39480d1
committed
refactor: remove watcher/subscriber infrastructure
Consumers (catalogstatus, policystatus) poll on their own tick intervals
and never used Subscribe(). The watcher relied on powersync_update_hooks
which has per-connection state — fundamentally broken with connection
pools. SetMaxOpenConns(1) fixed the tests but caused a sync deadlock
(Controller holds the sole write connection, starving the uploader).
Remove the whole thing: watch.go, watch_test.go, kickingDB, watchState,
installUpdateHooks, Subscribe, SetMaxOpenConns(1).1 parent 92806e5 commit 39480d1
5 files changed
Lines changed: 5 additions & 758 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
| |||
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
64 | | - | |
65 | 63 | | |
66 | 64 | | |
67 | 65 | | |
| |||
150 | 148 | | |
151 | 149 | | |
152 | 150 | | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | 151 | | |
159 | 152 | | |
160 | 153 | | |
| |||
181 | 174 | | |
182 | 175 | | |
183 | 176 | | |
184 | | - | |
| 177 | + | |
185 | 178 | | |
186 | 179 | | |
187 | 180 | | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
| 181 | + | |
200 | 182 | | |
201 | 183 | | |
202 | 184 | | |
| |||
240 | 222 | | |
241 | 223 | | |
242 | 224 | | |
243 | | - | |
244 | 225 | | |
245 | | - | |
| 226 | + | |
246 | 227 | | |
247 | 228 | | |
248 | 229 | | |
| |||
300 | 281 | | |
301 | 282 | | |
302 | 283 | | |
303 | | - | |
304 | | - | |
| 284 | + | |
305 | 285 | | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
| 286 | + | |
311 | 287 | | |
312 | 288 | | |
313 | 289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | 34 | | |
38 | 35 | | |
39 | 36 | | |
| |||
75 | 72 | | |
76 | 73 | | |
77 | 74 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | 75 | | |
84 | 76 | | |
85 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
This file was deleted.
0 commit comments