[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: syncrepl and attribute order



On 18.07.2012 15:49, Howard Chu wrote:
Evgeniy Kosov wrote:
On 18.07.2012 13:31, Howard Chu wrote:
Does attribute order matter? Is it specified somehow (sorted by
modification time?)?

No, attribute order in LDAP is unspecified.

Then why does syncrepl try to reorder attributes in a backend?

Syncrepl aims to make an entry on the consumer identical to the entry on the
provider.

The problem is that's impossible unless both backends (provider and consumer) do modifications to the object the same way (e.g. move modified attribute to the end of list). Is that (moving to the end) specified somewhere?

Btw, aren't the two objects below identical in terms of LDAP/LDIF?

dn: cn=johndoe,ou=users,o=example
cn: johndoe
sn: Doe
givenName: John


dn: cn=johndoe,ou=users,o=example
cn: johndoe
givenName: John
sn: Doe


Should this issue be reported as bug?

No. It is clearly working as designed.

If attribute order is unspecified, so apparently it mostly depends on
the backend implementation. On the other hand syncrepl makes an
assumption regarding (unspecified) attribute order and the result (list
of ops sent to a backend) depends on whether that assumption was right
or not.

Yes. It is assumed that, while attribute order is unspecified, once an order
has been set it will be preserved.

In the end, all these order-dependent modifications affect my
module, as I'm trying to hook on certain DIT changes and trigger
corresponding logic.

Could your "working as designed" be interpreted as "That didn't matter
so far"? Given my use case, could this design be thought over? If not,
what would be you recommendations in my case?

Use delta-syncrepl instead.


I'll have a closer look at it. Thank you.

--
Regards,
Evgeniy Kosov