Commit 3be601d
authored
fix: Remove newInboxProtectionWindow from LRU eviction (#518)
Remove the 12-minute protection window that prevented newly-created
inboxes from being evicted. When many recent inboxes exist (common
after creating/joining several conversations), all slots become
protected and eviction fails, causing push notification wakes to
fail with wakeCapacityExceeded.
Inboxes with nil lastActivity are now treated as preferred eviction
candidates since they have no message activity to lose. They will be
re-woken when the user navigates back to them.
Changes:
- Remove newInboxProtectionWindow constant from SleepingInboxMessageChecker
- Remove protection window check from sleepLeastRecentlyUsed()
- Update test to expect NULL activity inboxes to be evicted
- Remove obsolete test for protection window expiration1 parent 321087d commit 3be601d
3 files changed
Lines changed: 10 additions & 46 deletions
File tree
- ConvosCore
- Sources/ConvosCore/Inboxes
- Tests/ConvosCoreTests
Lines changed: 6 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
650 | 650 | | |
651 | 651 | | |
652 | 652 | | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | | - | |
658 | | - | |
659 | | - | |
660 | | - | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
661 | 657 | | |
662 | 658 | | |
663 | 659 | | |
664 | 660 | | |
665 | 661 | | |
666 | 662 | | |
667 | | - | |
668 | 663 | | |
669 | 664 | | |
670 | 665 | | |
671 | 666 | | |
672 | 667 | | |
673 | | - | |
674 | | - | |
| 668 | + | |
675 | 669 | | |
676 | 670 | | |
677 | 671 | | |
678 | 672 | | |
679 | 673 | | |
680 | 674 | | |
681 | 675 | | |
682 | | - | |
| 676 | + | |
683 | 677 | | |
684 | 678 | | |
685 | 679 | | |
| |||
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | 14 | | |
19 | 15 | | |
20 | 16 | | |
| |||
Lines changed: 4 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
178 | | - | |
| 177 | + | |
| 178 | + | |
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
| 197 | + | |
| 198 | + | |
225 | 199 | | |
226 | 200 | | |
227 | 201 | | |
| |||
0 commit comments