opensrp / opensrp-client-core

Core OpenSRP Android client library
http://smartregister.org/
Other
17 stars 41 forks source link

Sync Bug #817

Closed rkodev closed 3 years ago

rkodev commented 3 years ago

Events / Clients Sync

While uploading clients, the sync process stops and reports sync as completed after pushing the first batch of unsynced events, i.e with a sync batch configuration limit of 50 events, but having 5000 unsynced events, the sync reports as completed after the first batch is completed instead of after all the unsynced events are uploaded to the server.

NB: The data will eventually all get to the server with each subsequent sync retry but this is an issue for largely offline deployments

The method org.smartregister.sync.intent.SyncIntentService#pushECToServer is only called once, a fix will be to continuously check the database for change and upload any data after each successful request.

Validation Improvement

While validating data from the server, we simply mark the record as valid, an enhancement to this method will be to allow data, especially P2P received data, to download some server metadata i.e event._id, event. version , client._id, client_.version

ageryck commented 3 years ago

@ndegwamartin as we work on this can we have the same resource also work on the sync upgrade feature since they are closely related and both should be implemented in core? cc @muchuri

ndegwamartin commented 3 years ago

@ageryck yeah I think that is fine depending on the availability. Either way they should be separate tasks(different PRs e.t.c) and can essentially be worked on by different engineers and in parallel

ndegwamartin commented 3 years ago

@rkodev are we able to confirm for Validation whether it only fails for P2P records (or the others as well)? In which case we'd need to fix the way P2P saves the data on CHS devices?