Below is the list of changes that have just been committed into a local
6.0 repository of . When does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-10-19 10:47:42-04:00, jas@rowvwade. +1 -0
Relax exclusive lock around Section::insertStub.
storage/falcon/Section.cpp@stripped, 2007-10-19 10:47:35-04:00, jas@rowvwade. +17 -8
Relax exclusive lock around Section::insertStub.
diff -Nrup a/storage/falcon/Section.cpp b/storage/falcon/Section.cpp
--- a/storage/falcon/Section.cpp 2007-10-05 18:14:30 -04:00
+++ b/storage/falcon/Section.cpp 2007-10-19 10:47:35 -04:00
@@ -291,6 +291,8 @@ int32 Section::insertStub(TransId transI
for (int32 line = (freeLines) ? 0 : nextLine;; ++line)
{
+ ASSERT(sync.state == Exclusive);
+
// If there are some recently released free record numbers, use them first
if (freeLines)
@@ -312,6 +314,7 @@ int32 Section::insertStub(TransId transI
if (reservedRecordNumbers && reservedRecordNumbers->isSet(line))
continue;
+ sync.unlock();
int32 indexSequence = line / linesPerPage;
RecordLocatorPage *page;
@@ -334,6 +337,7 @@ int32 Section::insertStub(TransId transI
bdb->release(REL_HISTORY);
bdb = NULL;
line = (line + linesPerSection) / linesPerSection * linesPerSection - 1;
+ sync.lock(Exclusive);
continue;
}
@@ -377,8 +381,8 @@ int32 Section::insertStub(TransId transI
bdb->mark(transId);
index->line = 1;
- page->maxLine = MAX (page->maxLine, slot + 1);
- ASSERT (page->maxLine <= dbb->pagesPerSection);
+ page->maxLine = MAX(page->maxLine, slot + 1);
+ ASSERT(page->maxLine <= dbb->pagesPerSection);
bdb->release(REL_HISTORY);
// We have our line. Find the next potential line, and if it isn't in this
@@ -388,27 +392,30 @@ int32 Section::insertStub(TransId transI
if (reservedRecordNumbers || freeLines)
{
+ sync.lock(Shared);
int next = nextLine;
if (reservedRecordNumbers)
{
- int n = reservedRecordNumbers->nextSet (line + 1);
+ int n = reservedRecordNumbers->nextSet(line + 1);
+
if (n >= 0 && n < next)
next = n;
}
if (freeLines)
{
- int n = freeLines->nextSet (line + 1);
+ int n = freeLines->nextSet(line + 1);
if (n >= 0 && n < next)
next = n;
}
int nextSequence = next / linesPerSection;
-
+ sync.unlock();
+
if (nextSequence > sequence)
- markFull (true, sequence, transId);
+ markFull(true, sequence, transId);
if (!freeLines)
nextLine = line + 1;
@@ -418,7 +425,7 @@ int32 Section::insertStub(TransId transI
nextLine = line + 1;
if (nextLine % linesPerSection == 0)
- markFull (true, sequence, transId);
+ markFull(true, sequence, transId);
}
return line;
@@ -426,7 +433,9 @@ int32 Section::insertStub(TransId transI
if (line % linesPerSection == linesPerSection - 1 &&
(!reservedRecordNumbers || reservedRecordNumbers->nextSet(0) > line))
- markFull (true, indexSequence / dbb->pagesPerSection, transId);
+ markFull(true, indexSequence / dbb->pagesPerSection, transId);
+
+ sync.lock(Exclusive);
}
}
| Thread |
|---|
| • bk commit into 6.0 tree (jas:1.2669) | U-ROWVWADEjas | 19 Oct |