[horde] duplicate entries in horde_activesync_device

Michael J Rubinsky mrubinsk at horde.org
Thu Feb 27 14:29:19 UTC 2014


Quoting Ruud Baart <r.j.baart at prompt.nl>:

> Good day,
>
> my horde installation is quite up-to-date (latest stable version  
> with postgres 9.1 database) but the first installation is a long  
> time ago. I reinstalled and updated the data several times. I think  
> this history is the reason for duplicate entries in the table  
> horde_activesync_device. E.g. I see a device_id "androidc1042748122"  
> and also "ANDROIDC1042748122".


Possibly. There was an issue early on that caused the device to be  
written in both lcase and ucase in some cases.



> Although strictly speaking this is not a duplicate entry I see  
> problems in the active synchronisation which could be related to  
> this upper/lowercase duplicate entry. The active sync logfiles are  
> huge (one user gb/day). There are some other problems but I think  
> the duplicate entries in the table horde_activesync_device is one of  
> them. Lot's of messages like:
>
>    2014-02-23T10:38:13+01:00 NOTICE: [24166] Error saving state for
>    synckey {52fff2ce-9a20-42ae-81c8-6483ac170a01}20: SQLSTATE[23505]:
>    Unique violation: 7 ERROR:  duplicate key value violates unique
>    constraint "horde_activesync_state_pkey"

This is not related to the ucase/lcase device ids. This is a NOTICE,  
not an ERR, that indicates that the device did not receive a reply  
that it understood (or did not receive it at all) for the previously  
issued sync request. In cases like this, the device re-issues the same  
sync request (identified by the same syncKey (which is the pkey in the  
table in question). The server, after issuing this NOTICE, removes the  
previous state entry and tries again. The later part of that NOTICE  
should have mentioned that.


> The questions:
> - is it correct that the duplicate values (uppercase, lowercase  
> ID's) are not allowed

Not so much not allowed, as not really relevant. In either case, the  
device ids are now always written in lcase.

> - the error as displayed is a result of these duplicate entries?

No.

> - I assume the those device_id that are not in the table  
> horde_activesync_device_users can be removed in the table  
> horde_activesync_device. Is this correct?

Yes.

-- 
mike
The Horde Project
http://www.horde.org
https://www.facebook.com/hordeproject
https://www.twitter.com/hordeproject

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5849 bytes
Desc: S/MIME Signature
URL: <http://lists.horde.org/archives/horde/attachments/20140227/fea365a8/attachment.bin>


More information about the horde mailing list