Project

General

Profile

Actions

Activity #798

closed

Feature #138: Development and Unit Testing

Version #974: Version 1.3

Feature #977: App

Module #980: Data Sync

Handling interruptions in data upload sync

Added by Thara S Pillai almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Development-App
Start date:
08/14/2023
Due date:
08/31/2023
% Done:

100%

Estimated time:
Planned Due Date:

Description

A common identifier in both local and server.
In between connection drops/app closing may cause data to insert in the database but the status is not reflected at the local app side.
That can cause duplicate data insertion in the server in further data upload syncs.

Actions #1

Updated by Thara S Pillai almost 3 years ago

  • Assignee changed from Thara S Pillai to Aswathy M G
Actions #2

Updated by Thara S Pillai almost 3 years ago

  • Target version deleted (1)
Actions #3

Updated by Thara S Pillai almost 3 years ago

  • Tracker changed from Feature to Activity
  • Category set to Development-App
  • Assignee changed from Aswathy M G to Jiji P B
  • Parent task changed from #166 to #980
Actions #4

Updated by Jiji P B almost 3 years ago

  • % Done changed from 0 to 80

Testing in cdac upload.

Actions #5

Updated by Jiji P B almost 3 years ago

1. House survey upload completed.
2. Member survey upload completed.
3. need to change date format based on the uat server db.

Actions #6

Updated by Thara S Pillai almost 3 years ago

Include upload_timestamp in all local DB tables.

For handling interruptions in survey data upload sync where unique IDs are generated at server, need a common identifier in both local mobile DB and PH PostgreSQL server. In the current scenario, in between connection drops/app closing may cause data to insert in PH server database but the status of record upload may not get reflected at local mobile database. This can cause duplicate data insertion in server in further data upload syncs from the app.

• Instead of creating new Identifier fields, Generate a transaction identifier from existing house/member survey date currently in date type need to change as datetime..
• Then convert survey date to unix timestamp of 10 digits. Append ashablock Ids(padding of 5 digits suggested) with a character code H for House survey & M for Member survey.eg : H195341693638729.
• Keep this transaction Ids in local db for reference if required.
• Create a new status for sync flag for identifying which is already processed for uploading. only that records might need to resync if any interrupt occurs.
• Search the transaction identifier with dynamically generating transaction ids for each server records only for this pending above records ,if exists, update the local db record matching with same. else create new records in server and update in local db same as normal workflow does.

On checking sample data uploaded in UAT db, following points were noted.
• entry flag in member survey need to update as N for other id types also other than aadhaar. this is for data verification purposes recommended by DBA.
• text array empty values currently saving as {} need to change to null.
• latitude and longitude saving negative values should be restricted.
• notional db field saving wrong format data is some cases

Actions #7

Updated by Thara S Pillai almost 3 years ago

  • Description updated (diff)
Actions #8

Updated by Jiji P B almost 3 years ago

  • % Done changed from 80 to 100

1. Resolved: There is a query issue in upload function(server side), for handling the house_id, member_id of corresponding records that has generated in server but not updated/synched in localdb.

Actions #9

Updated by Thara S Pillai almost 3 years ago

  • Status changed from New to Closed

An issue identified in updating the house ID in the process for handling network interruptions using transaction ID. The correction was made in server side and tested from the app.

Actions

Also available in: Atom PDF