Discussion:
(ITS#8117) Bugs related to key-size in lmdb and backend
Леонид Юрьев
2015-04-30 15:28:40 UTC
Permalink
Hi, Howard.

As you told before, I will write to openldap-devel.

So, please take look to MDB_INTEGERDUP in mdb_attr_dbs_open().
I cutout ones and all tests are passing.

For my mdb_chk tool this is also solves a problem with checking
INTEGER-keys.
With MDB_INTEGERDUP removal a logic become spotless: keys must be
sizeof(int) or sizeof(size_t) only if MDB_INTEGERDUP or MDB_INTEGERKEY is
in a dbi-flags.

Would you agree to remove MDB_INTEGERDUP from the mdb_attr_dbs_open()?

Leonid.
OK, but then - what is the purpose of MDB_INTEGERDUP in
mdb_attr_dbs_open()?
flags = MDB_DUPSORT|MDB_DUPFIXED|MDB_INTEGERDUP;
if ( !(slapMode & SLAP_TOOL_READONLY) )
flags |= MDB_CREATE;
Think it is not necessary, is it?
You really think so? Have you thought about what the actual *values* are
in an index, instead of just the keys?
Anyway, this ITS is resolved. Thank you for reporting the bug. If you want
to ask further questions about how the indexer works take it to
openldap-devel.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
Howard Chu
2015-04-30 16:11:28 UTC
Permalink
Content preview: Леонид Юрьев wrote: > Hi, Howard. > > As you told
before, I will write to openldap-devel. > > So, please take look to MDB_INTEGERDUP
in mdb_attr_dbs_open(). > I cutout ones and all tests are passing. > > For
my mdb_chk tool this is also solves a problem with checking > INTEGER-keys.
With MDB_INTEGERDUP removal a logic become spotless: keys must be > sizeof(int)
or sizeof(size_t) only if MDB_INTEGERDUP or MDB_INTEGERKEY > is in a dbi-flags.
Post by Леонид Юрьев
Would you agree to remove MDB_INTEGERDUP from the mdb_attr_dbs_open()?
[...]

Content analysis details: (-4.2 points, 5.0 required)

pts rule name description
---- ---------------------- --------------------------------------------------
-2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium
trust
[69.43.206.106 listed in list.dnswl.org]
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
Cc: openldap-***@openldap.org
X-BeenThere: openldap-***@openldap.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: OpenLDAP development discussion list <openldap-devel.openldap.org>
List-Unsubscribe: <http://www.openldap.org/lists/mm/options/openldap-devel>,
<mailto:openldap-devel-***@openldap.org?subject=unsubscribe>
List-Archive: <http://www.openldap.org/lists/openldap-devel/>
List-Post: <mailto:openldap-***@openldap.org>
List-Help: <mailto:openldap-devel-***@openldap.org?subject=help>
List-Subscribe: <http://www.openldap.org/lists/mm/listinfo/openldap-devel>,
<mailto:openldap-devel-***@openldap.org?subject=subscribe>
Errors-To: openldap-devel-***@openldap.org
Sender: "openldap-devel" <openldap-devel-***@openldap.org>
X-Spam-Score: -4.2 (----)
X-Spam-Report: Spam detection software, running on the system "gauss.openldap.net", has
identified this incoming email as possible spam. The original message
has been attached to this so you can view it (if it isn't spam) or label
similar future email. If you have any questions, see
the administrator of that system for details.

Content preview: Леонид Юрьев wrote: > Hi, Howard. > > As you told
before, I will write to openldap-devel. > > So, please take look to MDB_INTEGERDUP
in mdb_attr_dbs_open(). > I cutout ones and all tests are passing. > > For
my mdb_chk tool this is also solves a problem with checking > INTEGER-keys.
With MDB_INTEGERDUP removal a logic become spotless: keys must be > sizeof(int)
or sizeof(size_t) only if MDB_INTEGERDUP or MDB_INTEGERKEY > is in a dbi-flags.
Post by Леонид Юрьев
Would you agree to remove MDB_INTEGERDUP from the mdb_attr_dbs_open()?
[...]

Content analysis details: (-4.2 points, 5.0 required)

pts rule name description
---- ---------------------- --------------------------------------------------
-2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium
trust
[69.43.206.106 listed in list.dnswl.org]
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
Hi, Howard.
As you told before, I will write to openldap-devel.
So, please take look to MDB_INTEGERDUP in mdb_attr_dbs_open().
I cutout ones and all tests are passing.
For my mdb_chk tool this is also solves a problem with checking
INTEGER-keys.
With MDB_INTEGERDUP removal a logic become spotless: keys must be
sizeof(int) or sizeof(size_t) only if MDB_INTEGERDUP or MDB_INTEGERKEY
is in a dbi-flags.
Would you agree to remove MDB_INTEGERDUP from the mdb_attr_dbs_open()?
No. The MDB_INTEGERDUP function was created for use in back-mdb's
indexer. It's a significant optimization; that is not going away.
Leonid.
OK, but then - what is the purpose of MDB_INTEGERDUP in
mdb_attr_dbs_open()?
flags = MDB_DUPSORT|MDB_DUPFIXED|MDB_INTEGERDUP;
if ( !(slapMode & SLAP_TOOL_READONLY) )
flags |= MDB_CREATE;
Think it is not necessary, is it?
You really think so? Have you thought about what the actual *values*
are in an index, instead of just the keys?
Anyway, this ITS is resolved. Thank you for reporting the bug. If
you want to ask further questions about how the indexer works take
it to openldap-devel.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
Леонид Юрьев
2015-04-30 16:53:17 UTC
Permalink
Post by Howard Chu
Post by Леонид Юрьев
Hi, Howard.
As you told before, I will write to openldap-devel.
So, please take look to MDB_INTEGERDUP in mdb_attr_dbs_open().
I cutout ones and all tests are passing.
For my mdb_chk tool this is also solves a problem with checking
INTEGER-keys.
With MDB_INTEGERDUP removal a logic become spotless: keys must be
sizeof(int) or sizeof(size_t) only if MDB_INTEGERDUP or MDB_INTEGERKEY
is in a dbi-flags.
Would you agree to remove MDB_INTEGERDUP from the mdb_attr_dbs_open()?
No. The MDB_INTEGERDUP function was created for use in back-mdb's
indexer. It's a significant optimization; that is not going away.

Ok.

Could you explain more details?

I want to understand - in which cases I could check that key-size is "good"
for a integer-modes?

Loading...