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

RE: Re: (ITS#9017) Improving performance of commit sync in Windows



<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" xmlns:w=3D"urn:sc=
hemas-microsoft-com:office:word" xmlns:m=3D"http://schemas.microsoft.com/of=
fice/2004/12/omml" xmlns=3D"http://www.w3.org/TR/REC-html40";><head><meta ht=
tp-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8"><meta name=
=3DGenerator content=3D"Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
.MsoChpDefault
	{mso-style-type:export-only;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
	{page:WordSection1;}
--></style></head><body lang=3DEN-CA link=3Dblue vlink=3D"#954F72"><div cla=
ss=3DWordSection1><p class=3DMsoNormal>Sorry, I should have added a little =
more detail. Specifically, I was seeing the `pos` variable in `mdb_page_flu=
sh` going over 2^31, and this being manifested in failed shift right here (=
resulting in 2^32 -1):<o:p></o:p></p><p class=3DMsoNormal><a href=3D"https:=
//github.com/LMDB/lmdb/blob/mdb.master/libraries/liblmdb/mdb.c#L3711">https=
://github.com/LMDB/lmdb/blob/mdb.master/libraries/liblmdb/mdb.c#L3711</a> <=
/p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>Thanks,<b=
r>Kris</p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><div style=3D'mso-eleme=
nt:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt=
 0cm 0cm 0cm'><p class=3DMsoNormal style=3D'border:none;padding:0cm'><b>Fro=
m: </b><a href=3D"mailto:hyc@symas.com";>Howard Chu</a><br><b>Sent: </b>Febr=
uary 20, 2020 9:08 PM<br><b>To: </b><a href=3D"mailto:kriszyp@gmail.com";>kr=
iszyp@gmail.com</a><br><b>Cc: </b><a href=3D"mailto:openldap-its@openldap.o=
rg">openldap-its@OpenLDAP.org</a><br><b>Subject: </b>Re: (ITS#9017) Improvi=
ng performance of commit sync in Windows</p></div><p class=3DMsoNormal><o:p=
>&nbsp;</o:p></p><p class=3DMsoNormal>Howard Chu wrote:</p><p class=3DMsoNo=
rmal>&gt; There should be an off64_t type instead.</p><p class=3DMsoNormal>=
<o:p>&nbsp;</o:p></p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DM=
soNormal>&gt; But it looks to me like only the env-&gt;me_size field could =
ever overflow,</p><p class=3DMsoNormal>&gt; and using size_t for that shoul=
d be fine. The other uses are for the meta page, which is always either off=
set 0 or</p><p class=3DMsoNormal>&gt; offset 4096 (with 4KB pagesize), and =
the lockfile, which is always smaller than 2GB.</p><p class=3DMsoNormal><o:=
p>&nbsp;</o:p></p><p class=3DMsoNormal>Ignore that, I was looking at the 0.=
9 branch when I wrote that.</p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><p=
 class=3DMsoNormal>-- </p><p class=3DMsoNormal>=C2=A0=C2=A0-- Howard Chu</p=
><p class=3DMsoNormal>=C2=A0 CTO, Symas Corp.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 http://www.symas.com</p><p class=3DMsoNormal=
>=C2=A0 Director, Highland Sun=C2=A0=C2=A0=C2=A0=C2=A0 http://highlandsun.c=
om/hyc/</p><p class=3DMsoNormal>=C2=A0 Chief Architect, OpenLDAP=C2=A0 http=
://www.openldap.org/project/</p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><=
/div></body></html>=