MerginMaps / MerginMaps/mobile
Failing push finish may cause duplicate features
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 388
- Forks
- 87
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 20
Description
If there is a push from the mobile app, and the "push finish" request is sent, and client gets a networking issue (e.g. "Software caused connection abort") and server successfully finished the transaction, the mobile app's client gets into an bad state:
- server knows the push was successful
- client thinks their push failed, so it keeps the changes it wanted to upload
- on the next sync, the client finds out there's a new version on the server, so it rebases the local changes, which means that any newly added features get duplicated (!) and synced, and updated/deleted features are likely causing an unexpected edit conflict files (the client thinking someone else has done the same updates/deletes)
The solution could be to distinguish network errors from server errors - and in case of a network error, the client could retry "push finish" request - the server should return 404 if the transaction has been successful (and it's too early for the transaction to expire), or the server should successfully finish the transaction if it was still unfinished.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the mobile client's push-finish request and how it handles networking errors versus server errors. Reproduce the connection-abort scenario and verify that a retry leaves the client and server consistent without duplicating or conflicting feature changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100