Commit 9ce6637
committed
Clean up a bunch of old encryption cruft
The global shared cache of encrypted file maps was originally required because
we actually opened Realm files mulitple times in normal usage, so each of the
open files had to know about each other to copy things around. #4839 made it so
that in normal usage we only ever have one DB instance per file per process, so
it became dead code. Multiprocess encryption made it unneccesary even when the
one-DB-per-process rule is violated, as the multiprocess code path covers that.
This eliminates our last reliance on file UniqueIDs, so it lets us get rid of
hacks related to that.
The encryption page reclaimer mostly never actually worked. It used a very
conserative page reclaimation rule that meant that pages would never be
reclaimed if there was a long-lived Transaction, even if it was frozen or kept
refreshed. This is very common in practice, and when it doesn't happen the DB
usually isn't kept open either, making it redundant.
Encryption used to rely on handling BAD_EXEC signals (or mach exceptions)
rather than explicit barriers, so it had to read and write in page-sized
chunks. That's no longer the case, so we can eliminate a lot of complexity by
always reading and writing in 4k blocks.1 parent 948949a commit 9ce6637
File tree
53 files changed
+1999
-3287
lines changed- src/realm
- exec
- object-store/impl
- sync
- noinst
- server
- tools
- util
- test
- object-store
- sync
- util/sync
- realm-fuzzer
- util
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
53 files changed
+1999
-3287
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
| |||
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| 28 | + | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
123 | | - | |
124 | | - | |
| 122 | + | |
125 | 123 | | |
126 | 124 | | |
127 | 125 | | |
| |||
135 | 133 | | |
136 | 134 | | |
137 | 135 | | |
138 | | - | |
139 | | - | |
140 | | - | |
| 136 | + | |
141 | 137 | | |
142 | 138 | | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
159 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
160 | 152 | | |
161 | 153 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
186 | 189 | | |
187 | | - | |
| 190 | + | |
188 | 191 | | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | 192 | | |
195 | 193 | | |
196 | 194 | | |
| |||
222 | 220 | | |
223 | 221 | | |
224 | 222 | | |
225 | | - | |
| 223 | + | |
226 | 224 | | |
227 | 225 | | |
228 | 226 | | |
| |||
252 | 250 | | |
253 | 251 | | |
254 | 252 | | |
255 | | - | |
| 253 | + | |
256 | 254 | | |
257 | 255 | | |
258 | 256 | | |
| |||
271 | 269 | | |
272 | 270 | | |
273 | 271 | | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
279 | 275 | | |
280 | 276 | | |
281 | 277 | | |
| |||
547 | 543 | | |
548 | 544 | | |
549 | 545 | | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | 546 | | |
559 | 547 | | |
560 | 548 | | |
| |||
566 | 554 | | |
567 | 555 | | |
568 | 556 | | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
573 | 560 | | |
574 | 561 | | |
575 | | - | |
576 | | - | |
577 | | - | |
578 | | - | |
| 562 | + | |
| 563 | + | |
579 | 564 | | |
580 | 565 | | |
581 | | - | |
582 | 566 | | |
583 | 567 | | |
584 | 568 | | |
585 | 569 | | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | | - | |
| 570 | + | |
| 571 | + | |
592 | 572 | | |
| 573 | + | |
593 | 574 | | |
594 | 575 | | |
595 | 576 | | |
| |||
0 commit comments