[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sqlite-dev
Subject:    Re: [sqlite-dev] sqlite3BtreeLeaveAll calls by sqlite3_blob_open()
From:       Jim Gullen <jim.gullen () yahoo ! com>
Date:       2011-12-30 11:08:31
Message-ID: 1325243311.86841.YahooMailNeo () web121203 ! mail ! ne1 ! yahoo ! com
[Download RAW message or body]

> Would this be purely to reduce the amount of time the mutexes
> are held? Or for some other reason as well?
> 
> The calls we could move are all in branches only taken for error
> conditions. So there is not really all that much to be gained
> from an increase in potential concurrency there. And moving the
> calls away from the "goto blob_open_out;" lines makes it (arguably)
> more difficult to immediately see that all the required LeaveAll()
> calls are present.
> 
> Thanks for the documentation fixes earlier too.
> 
> Dan.
---
Yes. Current placements reflect "author's preference". Would prefer "control \
preference", in this case, "releasing the Krakens" immediately, which would best \
convey "we're done with all btree mutexes now". --- I see the three "if" bodies as \
beginning with "BtreeLeaveAll" and ending with "goto blob_open_out."  But, I'm good \
with leaving things as they are. Except, got to mention the added clarity of moving \
                the fourth BtreeLeaveAll in similar fashion (heh):
---
// Lines 306..312
sqlite3BtreeLeaveAll(db);   // add here
pBlob->flags = flags;
pBlob->iCol = iCol;
pBlob->db = db;
sqlite3BtreeLeaveAll(db);   // delete from here
if( db->mallocFailed ){
goto blob_open_out;
}
---
Jim
P.S. Also, would someone please email me privately/off-list the instructions on the \
best way to reply? I manually copied the last portion of Dan's reply text and \
prepended angle-brackets. A bit of a drudge work. P.S.S. Also, pls excuse the ton of \
question marks substituted for leading blanks in my original post, although I may be \
the only recipient.


[Attachment #3 (text/html)]

<html><body><div style="color:#000; background-color:#fff; font-family:times new \
roman, new york, times, serif;font-size:12pt"><div>&gt; Would this be purely to \
reduce the amount of time the mutexes<br>&gt; are held? Or for some other reason as \
well?<br>&gt; <br>&gt; The calls we could move are all in branches only taken for \
error<br>&gt; conditions. So there is not really all that much to be gained<br>&gt; \
from an increase in potential concurrency there. And moving the</div><div>&gt; calls \
away from the "goto blob_open_out;" lines makes it (arguably)<br>&gt; more difficult \
to immediately see that all the required LeaveAll()<br>&gt; calls are \
present.<br>&gt; <br>&gt; Thanks for the documentation fixes earlier too.<br>&gt; \
<br>&gt; Dan.<br>---</div><div>Yes. Current placements reflect "author's preference". \
Would prefer "control preference", in this case, "releasing the Krakens" immediately, \
which would best convey "we're done with all btree mutexes  now". ---</div><div>I see \
the&nbsp;three "if" bodies as beginning with "BtreeLeaveAll" and ending with "goto \
blob_open_out." </div><div>But, I'm good with leaving things as they are. Except, \
got&nbsp;to mention the added clarity&nbsp;of moving the fourth&nbsp;BtreeLeaveAll in \
similar fashion (heh):</div><div>---</div><div>// Lines \
306..312</div><div>sqlite3BtreeLeaveAll(db);&nbsp;&nbsp; // add \
here<br>pBlob-&gt;flags = flags;<br>pBlob-&gt;iCol = iCol;<br>pBlob-&gt;db = \
db;<br>sqlite3BtreeLeaveAll(db);&nbsp;&nbsp; // delete from here<br>if( \
db-&gt;mallocFailed ){<br>goto \
blob_open_out;<br>}<br>---</div><div>Jim</div><div>P.S. Also, would someone please \
email me privately/off-list the instructions on the best way to&nbsp;reply? I \
manually copied the last portion of Dan's reply text and prepended angle-brackets. A \
bit of a drudge work.</div><div>P.S.S. Also, pls excuse the ton of question marks \
substituted for leading blanks in my original post, although I  may be the only \
recipient.</div></div></body></html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic