From 1d3d6bdcadc95e033bf83ae4e73367b146151ded Mon Sep 17 00:00:00 2001 From: Martin Dobrev Date: Sat, 5 Sep 2026 21:13:04 +0100 Subject: [PATCH] deps: microStore iterator holds its segment file open MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Records the fix now in the microStore retimesh/combined branch: the iterator reopened the segment file for every record, and on LittleFS each open replays the directory's metadata log, which grows with write activity. On the V4's 200-record path store that was 162 ms per record and a 32 s walk that tripped the task watchdog; it is now 32 ms per record and about 6 s. Comment only — the dependency is pinned by branch, so a clean fetch already picks this up. A bench with an existing .pio/libdeps needs pio pkg update to refetch. --- platformio.ini | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/platformio.ini b/platformio.ini index 21dbd08..a820882 100644 --- a/platformio.ini +++ b/platformio.ini @@ -127,8 +127,12 @@ lib_deps = ; #85 (packet-carrying AnnounceHandler callback), the announce-queue ; drain without which an interface forwards no further announce after ; the cap first makes it queue one, attermann/microStore#6 (close the - ; active segment before compaction) and the store sweep fix without - ; which every reboot empties the path table on a clock-less device. + ; active segment before compaction), the store sweep fix without + ; which every reboot empties the path table on a clock-less device, + ; and the iterator holding its segment file open across a walk instead + ; of reopening it per record — on LittleFS an open replays the + ; directory's metadata log, so a 200-record walk cost 32 s and tripped + ; the task watchdog; it costs about 6 s now. ; Both retimesh/combined branches are upstream master + those branches ; (+ a include fix in microReticulum). microReticulum=https://github.com/dobrevit/microReticulum.git#retimesh/combined