Skip to content

fix: right-size warm tier for constrained platforms (#10746, #10705) - #10759

Merged
thebentern merged 3 commits into
developfrom
fix/warmstore-constrained-platforms
Jun 22, 2026
Merged

fix: right-size warm tier for constrained platforms (#10746, #10705)#10759
thebentern merged 3 commits into
developfrom
fix/warmstore-constrained-platforms

Conversation

@caveman99

Copy link
Copy Markdown
Member

Constrained platforms fall into the generic WARM_NODE_COUNT 320 catch-all, which is too large for them.

Warm tier stays enabled on all platforms; generic ESP32 unchanged.

@github-actions

Copy link
Copy Markdown
Contributor

⚡ Try this PR in the Web Flasher

Note

Building this pull request… the flash button, badges and supported-board
list will appear here automatically once CI finishes.

@github-actions github-actions Bot added needs-review Needs human review bugfix Pull request that fixes bugs labels Jun 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts NodeDB warm-tier sizing and related caches on constrained platforms to avoid watchdog resets (RP2040/RP2350) and reduce heap pressure (ESP32 variants), improving stability when persisting large node databases.

Changes:

  • Feed the RP2040 hardware watchdog between the nodes.proto save and the warm-tier warm.dat save in NodeDB::saveNodeDatabaseToDisk().
  • Refine WARM_NODE_COUNT per-platform (including adding explicit RP2040 and no-PSRAM ESP32-S3/C6/P4 sizing).
  • Reduce TRAFFIC_MANAGEMENT_CACHE_SIZE on no-PSRAM ESP32-S3/C6/P4 and other ESP32 builds to reclaim heap.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/mesh/NodeDB.cpp Adds RP2040 watchdog “feed” between back-to-back NodeDB and warm-tier persistence writes.
src/mesh/mesh-pb-constants.h Refines per-platform warm-tier sizing and traffic-management cache sizing for constrained targets.

Comment thread src/mesh/mesh-pb-constants.h
Comment thread src/mesh/mesh-pb-constants.h Outdated
@NomDeTom

Copy link
Copy Markdown
Collaborator

Overall it seems eminently sensible. I've lost track of all the different esp32 flavours that are supported.

@caveman99

Copy link
Copy Markdown
Member Author

The real fix is to trigger the watchdog in between saves. BUT when researching this i stumbled across other crashes that really hit heap exhaustion. I think those values are sensible unless told otherwise :-)

@caveman99
caveman99 requested a review from thebentern June 22, 2026 09:54
@thebentern
thebentern merged commit c4fdf37 into develop Jun 22, 2026
75 of 77 checks passed
@caveman99
caveman99 deleted the fix/warmstore-constrained-platforms branch June 22, 2026 11:28
raghumad pushed a commit to raghumad/mezulla-firmware that referenced this pull request Jun 25, 2026
…meshtastic#10705) (meshtastic#10759)

* fix: right-size warm tier for constrained platforms and feed RP2040 watchdog during NodeDB save

* fix: size warm tier and traffic cache per-MCU RAM, lowering no-PSRAM ESP32 (classic/S2/C3) tiers

* docs: document nRF52/RP2040 #else fall-through in warm tier and TM cache cascades
cvaldess added a commit to cvaldess/firmware that referenced this pull request Jun 29, 2026
…ODE_COUNT=0)

Upstream meshtastic#10809 fixes the real root cause of the full-DB-save watchdog
reboot: a nested spiLock deadlock in WarmNodeStore::save() (SafeFile's
ctor/close re-acquire the non-recursive spiLock already held by the
LockGuard). With that merged into develop, the warm tier can run again on
RP2350 via the ARCH_RP2040 branch (=150, meshtastic#10759). Drop the
WARM_NODE_COUNT=0 override from both W5500 variants so they inherit the
upstream fix instead of disabling the warm tier.

Validated on-hardware (wiznet_5500_evb_pico2_e22p @ .236): ~18h soak with
the warm tier active, 208 eviction-at-full (120 nodes) events and 44
warm.dat writes (150 warm nodes), zero watchdog reboots. Build SUCCESS
(2.8.0.b5c2a81). See firmware#10809, firmware#10746.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Itzdavid01 pushed a commit to Itzdavid01/firmware that referenced this pull request Sep 5, 2026
…meshtastic#10705) (meshtastic#10759)

* fix: right-size warm tier for constrained platforms and feed RP2040 watchdog during NodeDB save

* fix: size warm tier and traffic cache per-MCU RAM, lowering no-PSRAM ESP32 (classic/S2/C3) tiers

* docs: document nRF52/RP2040 #else fall-through in warm tier and TM cache cascades
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Pull request that fixes bugs needs-review Needs human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants