hyc@OpenLDAP.org writes:
backend.c 1.412 -> 1.413 ITS#6393 syncrepl internal connids are now <= -1000
backend.c: 'op->o_connid <= -1000' is wrong. o_connid is unsigned long, so this is compiled as 'op->o_connid <= (unsigned long) -1000'.
I haven't looked at possible connid values, but maybe you want o_connid >= (unsigned long)-1000.
I wrote:
backend.c: 'op->o_connid <= -1000' is wrong. o_connid is unsigned long, so this is compiled as 'op->o_connid <= (unsigned long) -1000'.
Er... or maybe it's just the comment above the test which is wrong.
hyc@OpenLDAP.org writes:
backend.c 1.412 -> 1.413 ITS#6393 syncrepl internal connids are now <= -1000
backend.c: 'op->o_connid <= -1000' is wrong. o_connid is unsigned long, so this is compiled as 'op->o_connid <= (unsigned long) -1000'.
Right. Also, since o_connid is unsigned long, -1000-rid is a valid connid.
Perhaps, a char in the Connection structure, or yet another value in some bitmask would be better.
p.
masarati@aero.polimi.it wrote:
hyc@OpenLDAP.org writes:
backend.c 1.412 -> 1.413 ITS#6393 syncrepl internal connids are now <= -1000
backend.c: 'op->o_connid <= -1000' is wrong. o_connid is unsigned long, so this is compiled as 'op->o_connid <= (unsigned long) -1000'.
Right. Also, since o_connid is unsigned long, -1000-rid is a valid connid.
Perhaps, a char in the Connection structure, or yet another value in some bitmask would be better.
Except that doesn't help the issue with syncrepl and slap_graduate_commit_csn().
Another suggestion is to reserve connids 0-999 for syncrepl, and start the real connections at 1000.
syncrepl.c accepts rids up to SLAP_SYNC_SID_MAX = 4095, rather than up to SLAP_SYNC_RID_MAX = 999. Also I suppose SLAPD_SYNC_SYNCCONN_OFFSET should be -SLAP_SYNC_RID_MAX-1, so that constant is only hardcoded once. (I don't know what a rid and a sid actually is though.)
Hallvard B Furuseth wrote:
syncrepl.c accepts rids up to SLAP_SYNC_SID_MAX = 4095, rather than up to SLAP_SYNC_RID_MAX = 999. Also I suppose SLAPD_SYNC_SYNCCONN_OFFSET should be -SLAP_SYNC_RID_MAX-1, so that constant is only hardcoded once. (I don't know what a rid and a sid actually is though.)
http://www.openldap.org/its/index.cgi/Archive.Development?id=5108;selectid=5...