MerginMaps / MerginMaps/mobile

Project files' content cleared after an unsuccessful sync

Open
#2,382 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug data corruption - sync failure - crash - anr sync
Dominant language
C++
Stars
388
Forks
87
Avg merge
2d 7h
Merged PRs (30d)
20

Description

We have seen a data loss during synchronisation of a huge project.

The pull step has removed content of local files and the following push overwritten those files' content on the server.

How it happened:

  • Project is downloaded and has local changes waiting to be synced
  • Start to sync
  • MM Input detects that pull must be performed first as the server has remote changes
  • MM Input starts to download (pull) files from the server to the .temp dir
  • Some file chunks in the .temp directory can not be opened for writing and remain empty (but sync is not aborted!)
  • The following update of local files with those from .temp most probably cleared the content
  • GEODIFF screams error Missing 'base' file when opening sqlite driver (but sync is not aborted!)
  • GEODIFF yells another error Table names are not matching between the input databases (but sync is not aborted!)
  • Pull finished, continued with push
  • Some more geodiff errors Geodiff create changeset on Field Layer.gpkg FAILED with error 1 (will do full upload)
  • All files were successfully sent to server
  • Files on server were cleared

Not all the files were cleared, some files went through the sync fine.

Maybe the device did not have enough storage.

Contact me to get the diagnostic log.

Only saw on Apple devices 🍎 so far.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the MM Input pull flow and its .temp directory handling on Apple devices, then trace how failed file writes and GEODIFF errors are handled before local files are updated and a push begins. Reproduce the unsuccessful sync with the reported storage constraint and diagnostic log. Done means a failed pull cannot clear local files or allow cleared files to overwrite the server.

Written by the indexing model from the issue text.

Assessment

Tech stack
sqlite
Domain
data, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.