Skip to content

New update on conflict logic#6825

Merged
westnordost merged 6 commits into
masterfrom
new-update-on-conflict-logic
Apr 23, 2026
Merged

New update on conflict logic#6825
westnordost merged 6 commits into
masterfrom
new-update-on-conflict-logic

Conversation

@westnordost

@westnordost westnordost commented Apr 20, 2026

Copy link
Copy Markdown
Member

Ensure that all updated ways in MapDataUpdates are always complete (fixes #6779 and #6419)

This is a different solution for #5073 which also solves the aforementioned issues. So, reverted that, which makes it possible to create also an easy fix for #6771.

TODO:

  • Test:

    1. download some data in the app. Answer a question for a way, without uploading.
    2. in JOSM, add a new node to the way (e.g. make the way more precise), upload.
    3. try to upload the answer in StreetComplete
    4. answer should have uploaded correctly and the way's geometry should have updated to whatever change was made in JOSM
  • Test: Crash in MapDataWithEditsSource when a way in a bbox update has missing nodes #6779 (comment)

  • at least another pair of eyes for review

  • maybe also a unit test

@westnordost westnordost merged commit 3f9d15e into master Apr 23, 2026
@riQQ riQQ added the bug label Apr 23, 2026
@FloEdelmann FloEdelmann deleted the new-update-on-conflict-logic branch April 23, 2026 15:03
@Helium314

Helium314 commented Apr 24, 2026

Copy link
Copy Markdown
Collaborator

Sorry @westnordost for not checking earlier, but no time. Anyway, I think this should work.

One thing I'm not sure about: when downloading, nodes are persisted first, then ways. The LAST_SYNC timestamp is determined separately for each table, so if many nodes are added, there might be a few seconds beween node LAST_SYNC and way LAST_SYNC. In the unlikely case MapDataController.deleteOlderThan is called with a time just between those two, there are ways, but no nodes for some area of the map.
Could this trigger #6779?

@westnordost

Copy link
Copy Markdown
Member Author

Yes, I believe it could trigger that. (But a crash caused by this would fix itself latest after one day, i.e. the next time the cleaner runs.) But ofc, it was like this before, too.

@Helium314

Copy link
Copy Markdown
Collaborator

But ofc, it was like this before, too

In my understanding, before this PR nodes that are part of a way would not be deleted until the next run of the cleaner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash in MapDataWithEditsSource when a way in a bbox update has missing nodes

3 participants