[Kolab-devel] RE :Re: Z-push most common issue with duplicateUID

Georg C. F. Greve greve at kolabsys.com
Thu Dec 15 14:25:35 CET 2011


On Thursday 15 December 2011 13.02:12 ABBAS Alain wrote:
> Perhaps a command tool to check the groupware folders and eliminate
> dupplicates kolab Uids of an account should be well ?

That would cause all sorts of security issues and concerns, as it would be 
some daemon/regular task running with some kind of administrator privileges 
against the server. 

So this is definitely something that should be done by the client with the user 
credentials. On object modification/addition/deletion the client should:

 (1) Get all objects in that user's data structure with this Kolab UID,
		which is a single IMAP query

 (2) If there are zero or one objects returned: All is well, go to (4)

 (3) If there is more than one object returned: 

 (3a) If it is a delete operation: Set them all to \Deleted

 (3b)	Start from the last addition
			(= highest mod sequence / message id in folder)
	and iterate over them backwards checking for consistency.

 (3c) Break at first consistent object and use it for (4) onwards

 (3d) Set all others to \Deleted with expunge_mode: delayed as
		suggested by Jeroen (should be possible in single command,
		as well, I presume)

 (4) Perform adding operation

 (5) If it was a modification, delete the previous object

Duplicates should then only occur as a result of interruption between (4) and 
(5), or two simultaneous operations running by two different clients. 

The first case ought to be resolved on next access, so perhaps a process of

  (1) Get all objects in that user's data structure with this Kolab UID

  (2) If there is more than one object returned: 

  (2a) Start from the last addition backward, use first consistent object

  (2b) Set all others to \Deleted with expunge_mode: delayed

  (3) Push selected object to mobile phone

should also be run when an object has been modified on the server, for each new 
entry. That ought to catch virtually all cases, with a "last successful 
modification wins" approach, no?

Best regards,
Georg


-- 
Georg C. F. Greve
Chief Executive Officer

Kolab Systems AG
Zürich, Switzerland

e: greve at kolabsys.com
t: +41 78 904 43 33
w: http://kolabsys.com

pgp: 86574ACA Georg C. F. Greve




More information about the devel mailing list