Commit 0657c97
committed
fix: add MFS operation limit for --flush=false
adds a global counter that tracks consecutive MFS operations performed
with --flush=false and fails with clear error after limit is reached.
this prevents unbounded memory growth while avoiding the data corruption
risks of auto-flushing.
- adds Internal.MFSNoFlushLimit config
- operations fail with actionable error at limit
- counter resets on successful flush or any --flush=true operation
- operations with --flush=true reset and don't count
this commit removes automatic flush from #10971
and instead errors to encourage users of --flush=false to develop a habit
of calling 'ipfs files flush' periodically.
boxo will no longer auto-flush (ipfs/boxo#1041) to
avoid corruption issues, and kubo applies the limit to 'ipfs files' commands
instead.
closes #108421 parent 22f0377 commit 0657c97
File tree
5 files changed
+89
-38
lines changed- config
- core
- commands
- node
- docs
- changelogs
5 files changed
+89
-38
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
3 | 8 | | |
4 | 9 | | |
5 | 10 | | |
6 | 11 | | |
7 | 12 | | |
8 | 13 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | | - | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
35 | 37 | | |
36 | 38 | | |
37 | 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 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
38 | 77 | | |
39 | 78 | | |
40 | 79 | | |
| |||
68 | 107 | | |
69 | 108 | | |
70 | 109 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
77 | 115 | | |
78 | 116 | | |
79 | 117 | | |
| |||
516 | 554 | | |
517 | 555 | | |
518 | 556 | | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
519 | 563 | | |
520 | 564 | | |
521 | 565 | | |
522 | 566 | | |
523 | | - | |
524 | | - | |
525 | 567 | | |
526 | 568 | | |
527 | 569 | | |
| |||
847 | 889 | | |
848 | 890 | | |
849 | 891 | | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
850 | 896 | | |
851 | 897 | | |
852 | 898 | | |
| |||
984 | 1030 | | |
985 | 1031 | | |
986 | 1032 | | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
987 | 1037 | | |
988 | 1038 | | |
989 | 1039 | | |
| |||
1112 | 1162 | | |
1113 | 1163 | | |
1114 | 1164 | | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
1115 | 1169 | | |
1116 | 1170 | | |
1117 | 1171 | | |
| |||
1164 | 1218 | | |
1165 | 1219 | | |
1166 | 1220 | | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
1167 | 1224 | | |
1168 | 1225 | | |
1169 | 1226 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | 249 | | |
257 | 250 | | |
258 | 251 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1599 | 1599 | | |
1600 | 1600 | | |
1601 | 1601 | | |
1602 | | - | |
| 1602 | + | |
1603 | 1603 | | |
1604 | | - | |
1605 | | - | |
1606 | | - | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
1607 | 1607 | | |
1608 | | - | |
1609 | | - | |
1610 | | - | |
1611 | | - | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
1612 | 1611 | | |
1613 | | - | |
1614 | | - | |
1615 | | - | |
1616 | | - | |
1617 | | - | |
1618 | | - | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
1619 | 1616 | | |
1620 | 1617 | | |
1621 | 1618 | | |
1622 | | - | |
| 1619 | + | |
1623 | 1620 | | |
1624 | 1621 | | |
1625 | 1622 | | |
| |||
0 commit comments