Commit 04a0843
authored
Remove LMDB backend and ReadTransaction abstractions from turbo-tasks-backend (#91284)
## Summary
Remove the unused LMDB database backend and the `ReadTransaction` abstraction layer from `turbo-tasks-backend`. This is a pure cleanup that deletes ~1,500 lines of code and eliminates all `unsafe` blocks related to transaction lifetime management.
**Motivation:**
- This was much more useful in the early days of the persistence layer where comparing against a 'known good' db was useful, but this has rotted and turbo-persistence has gained lots of tests and usage so that this is not needed.
- Carrying the code added a lot of complexity to APIs e.g.
- The `ReadTransaction` abstraction existed solely to support LMDB's transaction-based read model
- The only remaining backend (`TurboKeyValueDatabase` via `turbo-persistence`) already used `()` as its `ReadTransaction` type, making the entire abstraction dead weight
- The transaction plumbing required `unsafe` transmute-based lifetime extension in `ExecuteContextImpl`, adding complexity and risk for no benefit
- The WriteBatch::Serial branches complicated already subtle code paths1 parent a65c3c8 commit 04a0843
File tree
25 files changed
+222
-2112
lines changed- crates/next-napi-bindings/src/next_api
- turbopack/crates
- turbo-tasks-backend
- src
- backend
- operation
- database
- lmdb
- turbo
- tests
- turbo-tasks-fetch/tests
- turbopack-analyze/tests
- turbopack-node/tests
- turbopack-tracing/tests
25 files changed
+222
-2112
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
| 225 | + | |
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
38 | | - | |
39 | 37 | | |
40 | 38 | | |
41 | | - | |
42 | 39 | | |
43 | 40 | | |
44 | 41 | | |
45 | 42 | | |
46 | | - | |
47 | 43 | | |
48 | 44 | | |
49 | 45 | | |
| |||
56 | 52 | | |
57 | 53 | | |
58 | 54 | | |
59 | | - | |
60 | 55 | | |
61 | 56 | | |
62 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
| 186 | + | |
| 187 | + | |
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
| |||
258 | 259 | | |
259 | 260 | | |
260 | 261 | | |
261 | | - | |
| 262 | + | |
262 | 263 | | |
263 | 264 | | |
264 | 265 | | |
| |||
Lines changed: 25 additions & 78 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
| |||
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
29 | | - | |
| 28 | + | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | 36 | | |
43 | 37 | | |
44 | 38 | | |
| |||
104 | 98 | | |
105 | 99 | | |
106 | 100 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
| 101 | + | |
112 | 102 | | |
113 | 103 | | |
114 | 104 | | |
115 | | - | |
116 | 105 | | |
117 | 106 | | |
118 | 107 | | |
119 | 108 | | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
| 109 | + | |
124 | 110 | | |
125 | 111 | | |
126 | 112 | | |
| |||
129 | 115 | | |
130 | 116 | | |
131 | 117 | | |
132 | | - | |
133 | 118 | | |
134 | 119 | | |
135 | 120 | | |
136 | 121 | | |
137 | 122 | | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
| 123 | + | |
| 124 | + | |
157 | 125 | | |
158 | 126 | | |
159 | 127 | | |
160 | | - | |
| 128 | + | |
161 | 129 | | |
162 | 130 | | |
163 | 131 | | |
164 | | - | |
| 132 | + | |
165 | 133 | | |
166 | 134 | | |
167 | 135 | | |
168 | | - | |
169 | 136 | | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
176 | 141 | | |
177 | 142 | | |
178 | 143 | | |
| |||
186 | 151 | | |
187 | 152 | | |
188 | 153 | | |
189 | | - | |
| 154 | + | |
190 | 155 | | |
191 | 156 | | |
192 | 157 | | |
193 | 158 | | |
194 | 159 | | |
195 | 160 | | |
196 | 161 | | |
197 | | - | |
| 162 | + | |
198 | 163 | | |
199 | 164 | | |
200 | 165 | | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
208 | 170 | | |
209 | 171 | | |
210 | 172 | | |
| |||
219 | 181 | | |
220 | 182 | | |
221 | 183 | | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | 184 | | |
230 | 185 | | |
231 | 186 | | |
| |||
396 | 351 | | |
397 | 352 | | |
398 | 353 | | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
| 354 | + | |
403 | 355 | | |
404 | 356 | | |
405 | | - | |
| 357 | + | |
406 | 358 | | |
407 | 359 | | |
408 | 360 | | |
| |||
636 | 588 | | |
637 | 589 | | |
638 | 590 | | |
639 | | - | |
640 | | - | |
| 591 | + | |
641 | 592 | | |
642 | 593 | | |
643 | | - | |
644 | 594 | | |
645 | 595 | | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
652 | | - | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
653 | 601 | | |
654 | 602 | | |
655 | 603 | | |
| |||
676 | 624 | | |
677 | 625 | | |
678 | 626 | | |
679 | | - | |
680 | 627 | | |
681 | 628 | | |
682 | 629 | | |
| |||
0 commit comments