Skip to content

Persist downloaded nodes when installing node info#3899

Closed
Jord-JD wants to merge 2 commits into
meshtastic:mainfrom
Jord-JD:bugfix/node-list-persist
Closed

Persist downloaded nodes when installing node info#3899
Jord-JD wants to merge 2 commits into
meshtastic:mainfrom
Jord-JD:bugfix/node-list-persist

Conversation

@Jord-JD

@Jord-JD Jord-JD commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

This is a possible fix for #3898 which I just reported.

I've built an APK (Google Debug) with this change, and tested it locally myself and it appears to fix the issue.

However, I'm new to this code base, and generally have not done much native Android app development, so it is very possible I have misunderstood something and/or this is not the best approach.

The general idea here is:

  • Add a forcePersist flag to MeshService.updateNodeInfo to allow immediate DB writes when ingesting a downloaded node DB.
  • Use forcePersist = true during installNodeInfo so nodes from the downloaded DB are persisted even before haveNodeDB is true.
  • Fixes the node list missing nodes that were only present in the initial download.

My understanding is that the downloaded node DB wasn’t persisted during installNodeInfo because updateNodeInfo only upserted when haveNodeDB was true. As a result, nodes that existed only in the initial download never reached the database and didn’t show up in the node list until they later transmitted.

I do not fully understand why this bug is only coming up for some people, but I think it only surfaces when the nodes in the downloaded DB stay quiet after the initial sync; if the mesh is chatty, those nodes later transmit and get persisted, masking the issue.

@CLAassistant

CLAassistant commented Dec 4, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot added the bugfix PR tag label Dec 4, 2025
@Jord-JD Jord-JD changed the title Persist downloaded nodes when installing node info - Fixes #3898 Persist downloaded nodes when installing node info Dec 4, 2025
@jamesarich

Copy link
Copy Markdown
Collaborator

closing in favor of #3932 - thank you!

@jamesarich jamesarich closed this Dec 8, 2025
@Jord-JD

Jord-JD commented Dec 8, 2025

Copy link
Copy Markdown
Contributor Author

Fair enough. Thanks for taking a look. 👍

@Jord-JD Jord-JD deleted the bugfix/node-list-persist branch December 8, 2025 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants