Commit 49b3fbe
committed
clean up Timer objects when using ttlAutopurge
This prevents a possible runaway resource utilization issue when using
ttlAutopurge.
If a single key is written to repetedly, then many NodeJS.Timer objects
will be created (or equivalent in the browser), and they are not
unscheduled when no longer needed. This results in many checks for
staleness happening unnecessarily, and so on.
Now, when a key is overwritten, set with no TTL, or any other behavior
that will mean that autopurge is no longer necessary, the timer is
cleared and deleted.1 parent b7b7c4e commit 49b3fbe
2 files changed
+87
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1253 | 1253 | | |
1254 | 1254 | | |
1255 | 1255 | | |
| 1256 | + | |
1256 | 1257 | | |
1257 | 1258 | | |
1258 | 1259 | | |
| |||
1277 | 1278 | | |
1278 | 1279 | | |
1279 | 1280 | | |
| 1281 | + | |
1280 | 1282 | | |
1281 | 1283 | | |
1282 | 1284 | | |
| |||
1553 | 1555 | | |
1554 | 1556 | | |
1555 | 1557 | | |
| 1558 | + | |
| 1559 | + | |
1556 | 1560 | | |
1557 | 1561 | | |
1558 | 1562 | | |
1559 | 1563 | | |
1560 | | - | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
1561 | 1572 | | |
1562 | 1573 | | |
1563 | 1574 | | |
| |||
1569 | 1580 | | |
1570 | 1581 | | |
1571 | 1582 | | |
| 1583 | + | |
1572 | 1584 | | |
1573 | 1585 | | |
1574 | 1586 | | |
| |||
2897 | 2909 | | |
2898 | 2910 | | |
2899 | 2911 | | |
| 2912 | + | |
| 2913 | + | |
| 2914 | + | |
| 2915 | + | |
2900 | 2916 | | |
2901 | 2917 | | |
2902 | 2918 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
0 commit comments