Dmytro Milinevskyy wrote:
> Hello,
> we've encountered this problem mainly on Android device. The kernel
> sends a fake signal and the baking storage(flash) is not so fast.
> I've noticed a typo in my patch for the macro DO_PWRITE in
> mdb_env_init_meta. The test should be done for EINTR, not EINVAL.
> Do you want me to resend the patch?
Yes I already noticed that, so I wrote the patch myself instead of
applying yours.
Thank you for the context, that's good information.
>
> Thanks,
> Dmytro
>
> On Fri, Apr 17, 2015 at 7:34 PM, Howard Chu <hyc(a)symas.com
> <mailto:hyc@symas.com>> wrote:
>
> milinevskyy(a)gmail.com <mailto:milinevskyy@gmail.com> wrote:
>
> Full_Name: Dmytro Milinevskyy
> Version:
> OS: Linux
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (92.132.131.166)
>
>
> On linux systems it's common to have system calls interrupted
> and restarted.
> LMDB should retry pwrites to avoid "false" failures.
>
>
> In practice, writes to a file are "fast" and will always write at
> least one byte. But we've patched this as suggested, thanks.
>
> --
> -- 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
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
--047d7bd910b0d34afe0513f14c84
Content-Type: text/plain; charset=UTF-8
Hello,
we've encountered this problem mainly on Android device. The kernel sends a
fake signal and the baking storage(flash) is not so fast.
I've noticed a typo in my patch for the macro DO_PWRITE in
mdb_env_init_meta. The test should be done for EINTR, not EINVAL.
Do you want me to resend the patch?
Thanks,
Dmytro
On Fri, Apr 17, 2015 at 7:34 PM, Howard Chu <hyc(a)symas.com> wrote:
> milinevskyy(a)gmail.com wrote:
>
>> Full_Name: Dmytro Milinevskyy
>> Version:
>> OS: Linux
>> URL: ftp://ftp.openldap.org/incoming/
>> Submission from: (NULL) (92.132.131.166)
>>
>>
>> On linux systems it's common to have system calls interrupted and
>> restarted.
>> LMDB should retry pwrites to avoid "false" failures.
>>
>
> In practice, writes to a file are "fast" and will always write at least
> one byte. But we've patched this as suggested, thanks.
>
> --
> -- Howard Chu
> CTO, Symas Corp. http://www.symas.com
> Director, Highland Sun http://highlandsun.com/hyc/
> Chief Architect, OpenLDAP http://www.openldap.org/project/
>
--047d7bd910b0d34afe0513f14c84
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div><div><div>Hello,<br>we've encountered this proble=
m mainly on Android device. The kernel sends a fake signal and the baking s=
torage(flash) is not so fast.<br>I've noticed a typo in my patch for th=
e macro DO_PWRITE in mdb_env_init_meta. The test should be done for EINTR, =
not EINVAL.<br></div>Do you want me to resend the patch?<br><br></div>Thank=
s,<br></div>Dmytro<br></div><div class=3D"gmail_extra"><br><div class=3D"gm=
ail_quote">On Fri, Apr 17, 2015 at 7:34 PM, Howard Chu <span dir=3D"ltr">&l=
t;<a href=3D"mailto:hyc@symas.com" target=3D"_blank">hyc(a)symas.com</a>><=
/span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8=
ex;border-left:1px #ccc solid;padding-left:1ex"><a href=3D"mailto:milinevsk=
yy(a)gmail.com" target=3D"_blank">milinevskyy(a)gmail.com</a> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
Full_Name: Dmytro Milinevskyy<br>
Version:<br>
OS: Linux<br>
URL: <a href=3D"ftp://ftp.openldap.org/incoming/" target=3D"_blank">ftp://f=
tp.openldap.org/incoming/</a><br>
Submission from: (NULL) (92.132.131.166)<br>
<br>
<br>
On linux systems it's common to have system calls interrupted and resta=
rted.<br>
LMDB should retry pwrites to avoid "false" failures.<br>
</blockquote>
<br>
In practice, writes to a file are "fast" and will always write at=
least one byte. But we've patched this as suggested, thanks.<span clas=
s=3D"HOEnZb"><font color=3D"#888888"><br>
<br>
-- <br>
=C2=A0 -- Howard Chu<br>
=C2=A0 CTO, Symas Corp.=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0<a href=3D"=
http://www.symas.com" target=3D"_blank">http://www.symas.com</a><br>
=C2=A0 Director, Highland Sun=C2=A0 =C2=A0 =C2=A0<a href=3D"http://highland=sun.com/hyc/" target=3D"_blank">http://highlandsun.com/hyc/</a><br>
=C2=A0 Chief Architect, OpenLDAP=C2=A0 <a href=3D"http://www.openldap.org/p=
roject/" target=3D"_blank">http://www.openldap.org/project/</a><br>
</font></span></blockquote></div><br></div>
--047d7bd910b0d34afe0513f14c84--
milinevskyy(a)gmail.com wrote:
> Full_Name: Dmytro Milinevskyy
> Version:
> OS: Linux
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (92.132.131.166)
>
>
> On linux systems it's common to have system calls interrupted and restarted.
> LMDB should retry pwrites to avoid "false" failures.
In practice, writes to a file are "fast" and will always write at least
one byte. But we've patched this as suggested, thanks.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
--f46d04426b642829070513e7a46a
Content-Type: text/plain; charset=UTF-8
Proposed patch in message body as issue tracker doesn't recognizes
attachments:
commit c9857a7c0df4448a14a2aa9f55850df5e830069e
Author: Dmytro Milinevskyy <milinevskyy(a)gmail.com>
Date: Fri Apr 17 10:41:26 2015 +0200
libmdb: retry write operation in case of interrupted system
diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c
index a95c7cd..ed7f370 100644
--- a/libraries/liblmdb/mdb.c
+++ b/libraries/liblmdb/mdb.c
@@ -3236,6 +3236,7 @@ mdb_page_flush(MDB_txn *txn, int keep)
/* Write up to MDB_COMMIT_PAGES dirty pages at a time. */
if (pos!=next_pos || n==MDB_COMMIT_PAGES ||
wsize+size>MAX_WRITE) {
if (n) {
+ retry_write:
/* Write previous page(s) */
#ifdef MDB_USE_PWRITEV
wres = pwritev(env->me_fd, iov, n, wpos);
@@ -3243,8 +3244,10 @@ mdb_page_flush(MDB_txn *txn, int keep)
if (n == 1) {
wres = pwrite(env->me_fd,
iov[0].iov_base, wsize, wpos);
} else {
+ retry_seek:
if (lseek(env->me_fd, wpos,
SEEK_SET) == -1) {
rc = ErrCode();
+ if (EINTR == rc) goto
retry_seek;
DPRINTF(("lseek: %s",
strerror(rc)));
return rc;
}
@@ -3254,6 +3257,7 @@ mdb_page_flush(MDB_txn *txn, int keep)
if (wres != wsize) {
if (wres < 0) {
rc = ErrCode();
+ if (EINTR == rc) goto
retry_write;
DPRINTF(("Write error: %s",
strerror(rc)));
} else {
rc = EIO; /* TODO: Use
which error code? */
@@ -3627,7 +3631,8 @@ mdb_env_init_meta(MDB_env *env, MDB_meta *meta)
int len;
#define DO_PWRITE(rc, fd, ptr, size, len, pos) do { \
len = pwrite(fd, ptr, size, pos); \
- rc = (len >= 0); } while(0)
+ if (len == -1 && EINVAL == ErrCode()) continue; \
+ rc = (len >= 0); break; } while(1)
#endif
DPUTS("writing new meta page");
@@ -3735,6 +3740,7 @@ mdb_env_write_meta(MDB_txn *txn)
/* Write to the SYNC fd */
mfd = (flags & (MDB_NOSYNC|MDB_NOMETASYNC)) ? env->me_fd :
env->me_mfd;
+retry_write:
#ifdef _WIN32
{
memset(&ov, 0, sizeof(ov));
@@ -3747,6 +3753,7 @@ mdb_env_write_meta(MDB_txn *txn)
#endif
if (rc != len) {
rc = rc < 0 ? ErrCode() : EIO;
+ if (EINTR == rc) goto retry_write;
DPUTS("write failed, disk error?");
/* On a failure, the pagecache still contains the new data.
* Write some old data back, to prevent it from being used.
On Fri, Apr 17, 2015 at 10:46 AM, Dmytro Milinevskyy <milinevskyy(a)gmail.com>
wrote:
> Proposed patch in attachment.
>
> On Fri, Apr 17, 2015 at 10:43 AM, <openldap-its(a)openldap.org> wrote:
>
>>
>> *** THIS IS AN AUTOMATICALLY GENERATED REPLY ***
>>
>> Thanks for your report to the OpenLDAP Issue Tracking System. Your
>> report has been assigned the tracking number ITS#8106.
>>
>> One of our support engineers will look at your report in due course.
>> Note that this may take some time because our support engineers
>> are volunteers. They only work on OpenLDAP when they have spare
>> time.
>>
>> If you need to provide additional information in regards to your
>> issue report, you may do so by replying to this message. Note that
>> any mail sent to openldap-its(a)openldap.org with (ITS#8106)
>> in the subject will automatically be attached to the issue report.
>>
>> mailto:openldap-its@openldap.org?subject=(ITS#8106)
>>
>> You may follow the progress of this report by loading the following
>> URL in a web browser:
>> http://www.OpenLDAP.org/its/index.cgi?findid=8106
>>
>> Please remember to retain your issue tracking number (ITS#8106)
>> on any further messages you send to us regarding this report. If
>> you don't then you'll just waste our time and yours because we
>> won't be able to properly track the report.
>>
>> Please note that the Issue Tracking System is not intended to
>> be used to seek help in the proper use of OpenLDAP Software.
>> Such requests will be closed.
>>
>> OpenLDAP Software is user supported.
>> http://www.OpenLDAP.org/support/
>>
>> --------------
>> Copyright 1998-2007 The OpenLDAP Foundation, All Rights Reserved.
>>
>>
>
--f46d04426b642829070513e7a46a
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: base64
PGRpdiBkaXI9Imx0ciI+UHJvcG9zZWQgcGF0Y2ggaW4gbWVzc2FnZSBib2R5IGFzIGlzc3VlIHRy
YWNrZXIgZG9lc24mIzM5O3QgcmVjb2duaXplcyBhdHRhY2htZW50czo8YnI+PGJyPmNvbW1pdCBj
OTg1N2E3YzBkZjQ0NDhhMTRhMmFhOWY1NTg1MGRmNWU4MzAwNjllPGJyPkF1dGhvcjogRG15dHJv
IE1pbGluZXZza3l5ICZsdDs8YSBocmVmPSJtYWlsdG86bWlsaW5ldnNreXlAZ21haWwuY29tIj5t
aWxpbmV2c2t5eUBnbWFpbC5jb208L2E+Jmd0Ozxicj5EYXRlOsKgwqAgRnJpIEFwciAxNyAxMDo0
MToyNiAyMDE1ICswMjAwPGJyPjxicj7CoMKgwqAgbGlibWRiOiByZXRyeSB3cml0ZSBvcGVyYXRp
b24gaW4gY2FzZSBvZiBpbnRlcnJ1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5b3UmIzM5O2xsIGp1c3Qgd2FzdGUgb3VyIHRp
bWUgYW5kIHlvdXJzIGJlY2F1c2Ugd2U8YnI+DQp3b24mIzM5O3QgYmUgYWJsZSB0byBwcm9wZXJs
eSB0cmFjayB0aGUgcmVwb3J0Ljxicj4NCjxicj4NClBsZWFzZSBub3RlIHRoYXQgdGhlIElzc3Vl
IFRyYWNraW5nIFN5c3RlbSBpcyBub3QgaW50ZW5kZWQgdG88YnI+DQpiZSB1c2VkIHRvIHNlZWsg
aGVscCBpbiB0aGUgcHJvcGVyIHVzZSBvZiBPcGVuTERBUCBTb2Z0d2FyZS48YnI+DQpTdWNoIHJl
cXVlc3RzIHdpbGwgYmUgY2xvc2VkLjxicj4NCjxicj4NCk9wZW5MREFQIFNvZnR3YXJlIGlzIHVz
ZXIgc3VwcG9ydGVkLjxicj4NCsKgIMKgIMKgIMKgIDxhIGhyZWY9Imh0dHA6Ly93d3cuT3BlbkxE
QVAub3JnL3N1cHBvcnQvIiB0YXJnZXQ9Il9ibGFuayI+aHR0cDovL3d3dy5PcGVuTERBUC5vcmcv
c3VwcG9ydC88L2E+PGJyPg0KPGJyPg0KLS0tLS0tLS0tLS0tLS08YnI+DQpDb3B5cmlnaHQgMTk5
OC0yMDA3IFRoZSBPcGVuTERBUCBGb3VuZGF0aW9uLCBBbGwgUmlnaHRzIFJlc2VydmVkLjxicj4N
Cjxicj4NCjwvYmxvY2txdW90ZT48L2Rpdj48YnI+PC9kaXY+DQo8L2Rpdj48L2Rpdj48L2Jsb2Nr
cXVvdGU+PC9kaXY+PGJyPjwvZGl2Pg0K
--f46d04426b642829070513e7a46a--
--089e013d0c3883937b0513e79d1c
Content-Type: multipart/alternative; boundary=089e013d0c3883936f0513e79d1a
--089e013d0c3883936f0513e79d1a
Content-Type: text/plain; charset=UTF-8
Proposed patch in attachment.
On Fri, Apr 17, 2015 at 10:43 AM, <openldap-its(a)openldap.org> wrote:
>
> *** THIS IS AN AUTOMATICALLY GENERATED REPLY ***
>
> Thanks for your report to the OpenLDAP Issue Tracking System. Your
> report has been assigned the tracking number ITS#8106.
>
> One of our support engineers will look at your report in due course.
> Note that this may take some time because our support engineers
> are volunteers. They only work on OpenLDAP when they have spare
> time.
>
> If you need to provide additional information in regards to your
> issue report, you may do so by replying to this message. Note that
> any mail sent to openldap-its(a)openldap.org with (ITS#8106)
> in the subject will automatically be attached to the issue report.
>
> mailto:openldap-its@openldap.org?subject=(ITS#8106)
>
> You may follow the progress of this report by loading the following
> URL in a web browser:
> http://www.OpenLDAP.org/its/index.cgi?findid=8106
>
> Please remember to retain your issue tracking number (ITS#8106)
> on any further messages you send to us regarding this report. If
> you don't then you'll just waste our time and yours because we
> won't be able to properly track the report.
>
> Please note that the Issue Tracking System is not intended to
> be used to seek help in the proper use of OpenLDAP Software.
> Such requests will be closed.
>
> OpenLDAP Software is user supported.
> http://www.OpenLDAP.org/support/
>
> --------------
> Copyright 1998-2007 The OpenLDAP Foundation, All Rights Reserved.
>
>
--089e013d0c3883936f0513e79d1a
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Proposed patch in attachment.<br></div><div class=3D"gmail=
_extra"><br><div class=3D"gmail_quote">On Fri, Apr 17, 2015 at 10:43 AM, <=
span dir=3D"ltr"><<a href=3D"mailto:openldap-its@openldap.org" target=3D=
"_blank">openldap-its(a)openldap.org</a>></span> wrote:<br><blockquote cla=
ss=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;pa=
dding-left:1ex"><br>
*** THIS IS AN AUTOMATICALLY GENERATED REPLY ***<br>
<br>
Thanks for your report to the OpenLDAP Issue Tracking System.=C2=A0 Your<br=
>
report has been assigned the tracking number ITS#8106.<br>
<br>
One of our support engineers will look at your report in due course.<br>
Note that this may take some time because our support engineers<br>
are volunteers.=C2=A0 They only work on OpenLDAP when they have spare<br>
time.<br>
<br>
If you need to provide additional information in regards to your<br>
issue report, you may do so by replying to this message.=C2=A0 Note that<br=
>
any mail sent to <a href=3D"mailto:openldap-its@openldap.org">openldap-its@=
openldap.org</a> with (ITS#8106)<br>
in the subject will automatically be attached to the issue report.<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 mailto:<a href=3D"mailto:openldap-its@openldap.=
org">openldap-its(a)openldap.org</a>?subject=3D(ITS#8106)<br>
<br>
You may follow the progress of this report by loading the following<br>
URL in a web browser:<br>
=C2=A0 =C2=A0 <a href=3D"http://www.OpenLDAP.org/its/index.cgi?findid=3D810=
6" target=3D"_blank">http://www.OpenLDAP.org/its/index.cgi?findid=3D8106</a=
><br>
<br>
Please remember to retain your issue tracking number (ITS#8106)<br>
on any further messages you send to us regarding this report.=C2=A0 If<br>
you don't then you'll just waste our time and yours because we<br>
won't be able to properly track the report.<br>
<br>
Please note that the Issue Tracking System is not intended to<br>
be used to seek help in the proper use of OpenLDAP Software.<br>
Such requests will be closed.<br>
<br>
OpenLDAP Software is user supported.<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 <a href=3D"http://www.OpenLDAP.org/support/" ta=
rget=3D"_blank">http://www.OpenLDAP.org/support/</a><br>
<br>
--------------<br>
Copyright 1998-2007 The OpenLDAP Foundation, All Rights Reserved.<br>
<br>
</blockquote></div><br></div>
--089e013d0c3883936f0513e79d1a--
--089e013d0c3883937b0513e79d1c
Content-Type: text/x-patch; charset=US-ASCII;
name="0001-libmdb-retry-write-operation-in-case-of-interrupted-.patch"
Content-Disposition: attachment;
filename="0001-libmdb-retry-write-operation-in-case-of-interrupted-.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_i8lcpk680
RnJvbSBjOTg1N2E3YzBkZjQ0NDhhMTRhMmFhOWY1NTg1MGRmNWU4MzAwNjllIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBEbXl0cm8gTWlsaW5ldnNreXkgPG1pbGluZXZza3l5QGdtYWls
LmNvbT4KRGF0ZTogRnJpLCAxNyBBcHIgMjAxNSAxMDo0MToyNiAr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JcmMgPSAobGVuID49IDApOyBicmVhazsgfSB3aGlsZSgx
KQogI2VuZGlmCiAKIAlEUFVUUygid3JpdGluZyBuZXcgbWV0YSBwYWdlIik7CkBAIC0zNzM1LDYg
KzM3NDAsNyBAQCBtZGJfZW52X3dyaXRlX21ldGEoTURCX3R4biAqdHhuKQogCiAJLyogV3JpdGUg
dG8gdGhlIFNZTkMgZmQgKi8KIAltZmQgPSAoZmxhZ3MgJiAoTURCX05PU1lOQ3xNREJfTk9NRVRB
U1lOQykpID8gZW52LT5tZV9mZCA6IGVudi0+bWVfbWZkOworcmV0cnlfd3JpdGU6CiAjaWZkZWYg
X1dJTjMyCiAJewogCQltZW1zZXQoJm92LCAwLCBzaXplb2Yob3YpKTsKQEAgLTM3NDcsNiArMzc1
Myw3IEBAIG1kYl9lbnZfd3JpdGVfbWV0YShNREJfdHhuICp0eG4pCiAjZW5kaWYKIAlpZiAocmMg
IT0gbGVuKSB7CiAJCXJjID0gcmMgPCAwID8gRXJyQ29kZSgpIDogRUlPOworCQlpZiAoRUlOVFIg
PT0gcmMpIGdvdG8gcmV0cnlfd3JpdGU7CiAJCURQVVRTKCJ3cml0ZSBmYWlsZWQsIGRpc2sgZXJy
b3I/Iik7CiAJCS8qIE9uIGEgZmFpbHVyZSwgdGhlIHBhZ2VjYWNoZSBzdGlsbCBjb250YWlucyB0
aGUgbmV3IGRhdGEuCiAJCSAqIFdyaXRlIHNvbWUgb2xkIGRhdGEgYmFjaywgdG8gcHJldmVudCBp
dCBmcm9tIGJlaW5nIHVzZWQuCi0tIAoyLjMuNQoK
--089e013d0c3883937b0513e79d1c--
Full_Name: Dmytro Milinevskyy
Version:
OS: Linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (92.132.131.166)
On linux systems it's common to have system calls interrupted and restarted.
LMDB should retry pwrites to avoid "false" failures.
ryan(a)nardis.ca wrote:
> Full_Name: Ryan Tandy
> Version: master, 2.4
> OS: Debian
> URL:
> Submission from: (NULL) (24.68.37.4)
>
Thanks, pushed to git master.
> updating the copied nss-pam-ldapd files:
>
> ftp://ftp.openldap.org/incoming/20150405_rtandy_nssov-update-nss-pam-ldapd-…
>
> updating nssov for those changes, see commit msg for details:
>
> ftp://ftp.openldap.org/incoming/20150405_rtandy_nssov-update-to-protocol-ve…
>
> while I'm in the code anyway, cleaning up a few compiler warnings (that were
> already there, I didn't introduce them :P). Cosmetic stuff: unused variables,
> return-type (void/non-void) mismatches, a couple of undeclared prototypes.
>
> ftp://ftp.openldap.org/incoming/20150405_rtandy_nssov-clean-up-some-compile…
>
> Please note, the protocol change breaks backwards compat with older versions of
> the client libraries (per nss-pam-ldapd/README).
>
> Tested on Linux. No idea about Solaris etc, sorry.
>
> The DN field was removed from the pam protocol, so uid lookup happens on every
> connection now. I couldn't think of a safe way to avoid that; suggestions
> welcome.
>
> --
>
> (the following statements apply to patches 2 and 3 only; patch 1 is copied from
> work by Arthur de Jong, licensed LGPLv2.1)
>
> The attached patch files are derived from OpenLDAP Software. All of the
> modifications to OpenLDAP Software represented in the preceding patches were
> developed by Ryan Tandy <ryan(a)nardis.ca>. I have not assigned rights and/or
> interest in this work to any party.
>
> I, Ryan Tandy, hereby place the preceding modifications to OpenLDAP Software
> (and only these modifications) into the public domain. Hence, these
> modifications may be freely used and/or redistributed for any purpose with or
> without attribution and/or other notice.
>
>
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
rouzier(a)gmail.com wrote:
> Full_Name: James Rouzier
> Version:
> OS:
> URL: ftp://ftp.openldap.org/incoming/james-rouzier-150331.patch
> Submission from: (NULL) (192.222.129.11)
>
>
> I am working on a proof of concept of a simple key value store service using
> lmdb as the back end.
> I am using sendfile to avoid an extra copy.
> I accomplished this by creating function to extract get the mmap ptr from the
> env so I can calculate the offset of data.
I'm quite reluctant to return the mmap pointer. In a WRITEMAP
environment that invites all manner of undetectable/unpreventable
corruptions.
Have you actually measured the performance difference between using
sendfile() here and plain write() or send()? The kernel doesn't
physically copy the written data from user space to kernel space, it
just maps in a particular page. Since LMDB data is already mmap'd, the
kernel has very little work to do since the relevant pages are already
present in the kernel's page tables.
Ultimately sending data over TCP involves byte-by-byte iteration anyway,
since TCP checksums must be computed on all outgoing data. Doesn't seem
to me like sendfile can be a very significant optimization here.
>
> I figured that function might be useful to the bigger community.
>
> If it does not fit in the bigger vision of lmdb it is fine not to include it.
>
>
> I, James Rouzier, hereby place the following modifications to OpenLDAP Software
> (and only these modifications) into the public domain. Hence, these
> modifications may be freely used and/or redistributed for any purpose with or
> without attribution and/or other notice.
>
>
>
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
pk(a)dbic.pro wrote:
> Full_Name: Pavel Kraynyukhov
> Version: only LMDB from git and lmdb-0.9.14
> OS: Gentoo Linux
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (37.99.47.171)
>
>
> Hello there, I have ran into an issue with LMDB, which I can reproduce at will,
> but it seems a specific one. The git commit is
> 3368d1f5e243225cba4d730fba19ff600798ebe3
> And this commit and my issue seems to be related.
>
> 1. I use MDB_NOTLS flag on environment open.
> 2. if I use MDB_NOSYNC flag for LMDB environment, the writer thread is stuck
> after several transactions (writer thread backtrace):
> P.S. tested against system provided lmdb version 0.9.14 and result is the same.
> So this maybe not related to latest commit in git.
If you're having this problem in 0.9.14 then it is certainly not related
to 3368d1f5e243225cba4d730fba19ff600798ebe3.
You confirm that the issue does not occur in 0.9.13? Can you upload a
test case demonstrating the problem?
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/