Issue 5108 - SID/RID: decimal or hex?
Summary: SID/RID: decimal or hex?
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-26 14:29 UTC by ando@openldap.org
Modified: 2014-08-01 21:05 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description ando@openldap.org 2007-08-26 14:29:32 UTC
Full_Name: Pierangelo Masarati
Version: HEAD/re23
OS: irrelevant
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (82.63.140.131)
Submitted by: ando


Should SID/RID be decimal (0-999) as in parsing and the rest of the syncrepl
code, or hexadecimal (0-FFF) as in code generating CSN values?  I understand the
point is (almost) moot, but we'd get there as soon as someone starts using
>10-way multimaster...

I'm fixing the code so that it consistently uses hex server IDs, please holler
if using decimals is preferred.

p.

Comment 1 ando@openldap.org 2007-08-26 14:35:54 UTC
moved from Incoming to Software Bugs
Comment 2 ando@openldap.org 2007-08-26 14:36:10 UTC
changed notes
Comment 3 ando@openldap.org 2007-08-26 14:47:05 UTC
ando@sys-net.it wrote:

> Should SID/RID be decimal (0-999) as in parsing and the rest of the syncrepl
> code, or hexadecimal (0-FFF) as in code generating CSN values?  I understand the
> point is (almost) moot, but we'd get there as soon as someone starts using
>> 10-way multimaster...

or, if RID is to be typed in decimal form, let's remove the 3 digit
limitation, and set a < 4096 limitation like for serverID.

p.



Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
---------------------------------------
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Email:   pierangelo.masarati@sys-net.it
---------------------------------------


Comment 4 ando@openldap.org 2007-08-26 15:08:54 UTC
changed notes
changed state Open to Test
Comment 5 Howard Chu 2007-08-26 19:58:01 UTC
ando@sys-net.it wrote:
> Full_Name: Pierangelo Masarati
> Version: HEAD/re23
> OS: irrelevant
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (82.63.140.131)
> Submitted by: ando
> 
> 
> Should SID/RID be decimal (0-999) as in parsing and the rest of the syncrepl
> code, or hexadecimal (0-FFF) as in code generating CSN values?  I understand the
> point is (almost) moot, but we'd get there as soon as someone starts using
>> 10-way multimaster...
> 
> I'm fixing the code so that it consistently uses hex server IDs, please holler
> if using decimals is preferred.

The SID in the CSN has always been hex (but usually zero). The RID is not part 
of the CSN and has always been decimal. Since the RID only needs to be unique 
within a particular slapd instance, there's no real problem there.

-- 
   -- Howard Chu
   Chief Architect, Symas Corp.  http://www.symas.com
   Director, Highland Sun        http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP     http://www.openldap.org/project/

Comment 6 ando@openldap.org 2007-08-27 04:56:57 UTC
Howard Chu wrote:
> ando@sys-net.it wrote:
>> Full_Name: Pierangelo Masarati
>> Version: HEAD/re23
>> OS: irrelevant
>> URL: ftp://ftp.openldap.org/incoming/
>> Submission from: (NULL) (82.63.140.131)
>> Submitted by: ando
>>
>>
>> Should SID/RID be decimal (0-999) as in parsing and the rest of the
>> syncrepl
>> code, or hexadecimal (0-FFF) as in code generating CSN values?  I
>> understand the
>> point is (almost) moot, but we'd get there as soon as someone starts
>> using
>>> 10-way multimaster...
>>
>> I'm fixing the code so that it consistently uses hex server IDs,
>> please holler
>> if using decimals is preferred.
> 
> The SID in the CSN has always been hex (but usually zero). The RID is
> not part of the CSN and has always been decimal. Since the RID only
> needs to be unique within a particular slapd instance, there's no real
> problem there.
> 

Right.  but, well, slap_parse_csn_sid() was using strtoul(..., 10).  Now
fixed.  For consistency I've made both behave the same.  The user won't
basically notice it, so I don't see backward compatibility issues.

p.



Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
---------------------------------------
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Email:   pierangelo.masarati@sys-net.it
---------------------------------------


Comment 7 Howard Chu 2007-08-27 05:04:58 UTC
ando@sys-net.it wrote:
> Howard Chu wrote:

>> The SID in the CSN has always been hex (but usually zero). The RID is
>> not part of the CSN and has always been decimal. Since the RID only
>> needs to be unique within a particular slapd instance, there's no real
>> problem there.
>>
> 
> Right.  but, well, slap_parse_csn_sid() was using strtoul(..., 10).  Now
> fixed.

Yeah, oops. That's good.

> For consistency I've made both behave the same.  The user won't
> basically notice it, so I don't see backward compatibility issues.

So we leave the docs saying RID is 0-999?

-- 
   -- Howard Chu
   Chief Architect, Symas Corp.  http://www.symas.com
   Director, Highland Sun        http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP     http://www.openldap.org/project/

Comment 8 ando@openldap.org 2007-08-27 05:07:05 UTC
Howard Chu wrote:
> ando@sys-net.it wrote:
>> Howard Chu wrote:
> 
>>> The SID in the CSN has always been hex (but usually zero). The RID is
>>> not part of the CSN and has always been decimal. Since the RID only
>>> needs to be unique within a particular slapd instance, there's no real
>>> problem there.
>>>
>>
>> Right.  but, well, slap_parse_csn_sid() was using strtoul(..., 10).  Now
>> fixed.
> 
> Yeah, oops. That's good.
> 
>> For consistency I've made both behave the same.  The user won't
>> basically notice it, so I don't see backward compatibility issues.
> 
> So we leave the docs saying RID is 0-999?

Well, in slapd.conf(5) I already put 0-4095, but be can back it out.  I
don't have any preference.  Since the max will just slightly increase, I
don't see a big deal in terms of backwards compatibility.  In any case
4096 or 1000 is big for a RID, so no-one will be hurt.  I was more
concerned about the 10 limit...

p.



Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
---------------------------------------
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Email:   pierangelo.masarati@sys-net.it
---------------------------------------


Comment 9 Howard Chu 2007-08-27 05:14:41 UTC
ando@sys-net.it wrote:
> Well, in slapd.conf(5) I already put 0-4095, but be can back it out.  I
> don't have any preference.  Since the max will just slightly increase, I
> don't see a big deal in terms of backwards compatibility.  In any case
> 4096 or 1000 is big for a RID, so no-one will be hurt.  I was more
> concerned about the 10 limit...

OK. I kind of think they ought to be documented differently, so that people 
don't confuse SIDs with RIDs (as often happened in OpenLDAP 2.2) but it's 
probably fine the way it is.
-- 
   -- Howard Chu
   Chief Architect, Symas Corp.  http://www.symas.com
   Director, Highland Sun        http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP     http://www.openldap.org/project/

Comment 10 ando@openldap.org 2007-08-27 05:50:32 UTC
changed notes
moved from Software Bugs to Development
Comment 11 Howard Chu 2007-09-02 10:27:15 UTC
changed notes
changed state Test to Release
Comment 12 Howard Chu 2007-09-21 23:31:27 UTC
changed notes
changed state Release to Closed
Comment 13 Howard Chu 2009-02-17 06:57:09 UTC
moved from Development to Archive.Development
Comment 14 OpenLDAP project 2014-08-01 21:05:26 UTC
syncrepl
fixed in HEAD/RE24