iMMAP / OASISClientV4

1 stars 3 forks source link

Synch Engine - Deleted Table [4.1.23] #39

Closed ppolphong closed 10 years ago

ppolphong commented 10 years ago

Let's say that we have table ddZ in a module. We want to delete all the records from ddZ and also remove ddZ from the module.

Synch engine will keep trying to find records in ddZ to delete while the ddZ table was removed from the server and clients.

ppolphong commented 10 years ago

More explanation for this case

  1. I have modue iMMAPStaff with the following tables iMMAPStaff_mastertable (has 10 records) iMMAPStaff_ddPrefix (has 2 records) iMMAPStaff_ddLocation (has 5 records)
  2. At the moment I should have 17 records in SynhHistory table.
  3. I want to remove iMMAPStaff_ddLocation from iMMAPStaff module. Here is my step 3.1 I will update SynhHistory for the 5 records in iMMAPStaff_ddLocation. At the moment, I will use DELETEDD_SynchHistoryByTableName stored procedure. This will update sDELETE to true, swhen current time, and increase sequence by 1. 3.2 I will then remove iMMAPStaff_ddLocation from the module.

Synch engine will keep trying to find records in iMMAPStaff_ddLocation to delete while the iMMAPStaff_ddLocation table was removed from the server.

KeithDoyle commented 10 years ago

Thanks for the explanation - I think what we need here is this to be executed before a data synch: 1- Check server tables 2- Check client tables 3- If server table exists but not on client -> create client table 4- If client table exists but not on server -> delete client table (and remove from client synchhistory)

Does this work?

ppolphong commented 10 years ago

That should be OK...I think. Just have to make sure when check for number 4 that things like 'time out' or server down time doesn't count as 'not on server'

KeithDoyle commented 10 years ago

good point

KeithDoyle commented 10 years ago

update to this bug:

create SP called: "SP_KILLTABLE" 1) delete server table 2) delete server table records from synchhistory

then test. The synch engine should remove the table from the client

KeithDoyle commented 10 years ago

Please confirm if this is fixed

ppolphong commented 10 years ago

confirm!

petri2000 commented 10 years ago

Done