Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
e609add7
Commit
e609add7
authored
Sep 26, 2006
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into perch.ndb.mysql.com:/home/jonas/src/51-work
parents
64bf3383
9c4483d6
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
139 additions
and
98 deletions
+139
-98
storage/ndb/include/ndbapi/NdbTransaction.hpp
storage/ndb/include/ndbapi/NdbTransaction.hpp
+5
-2
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
+71
-60
storage/ndb/src/ndbapi/NdbScanOperation.cpp
storage/ndb/src/ndbapi/NdbScanOperation.cpp
+20
-2
storage/ndb/src/ndbapi/NdbTransaction.cpp
storage/ndb/src/ndbapi/NdbTransaction.cpp
+43
-34
No files found.
storage/ndb/include/ndbapi/NdbTransaction.hpp
View file @
e609add7
...
@@ -658,7 +658,10 @@ private:
...
@@ -658,7 +658,10 @@ private:
// Release all cursor operations in connection
// Release all cursor operations in connection
void
releaseOps
(
NdbOperation
*
);
void
releaseOps
(
NdbOperation
*
);
void
releaseScanOperations
(
NdbIndexScanOperation
*
);
void
releaseScanOperations
(
NdbIndexScanOperation
*
);
void
releaseScanOperation
(
NdbIndexScanOperation
*
);
bool
releaseScanOperation
(
NdbIndexScanOperation
**
listhead
,
NdbIndexScanOperation
**
listtail
,
NdbIndexScanOperation
*
op
);
void
releaseExecutedScanOperation
(
NdbIndexScanOperation
*
);
// Set the transaction identity of the transaction
// Set the transaction identity of the transaction
void
setTransactionId
(
Uint64
aTransactionId
);
void
setTransactionId
(
Uint64
aTransactionId
);
...
...
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
View file @
e609add7
...
@@ -10015,15 +10015,19 @@ void Dbdih::startNextChkpt(Signal* signal)
...
@@ -10015,15 +10015,19 @@ void Dbdih::startNextChkpt(Signal* signal)
nodePtr
.
i
=
replicaPtr
.
p
->
procNode
;
nodePtr
.
i
=
replicaPtr
.
p
->
procNode
;
ptrCheckGuard
(
nodePtr
,
MAX_NDB_NODES
,
nodeRecord
);
ptrCheckGuard
(
nodePtr
,
MAX_NDB_NODES
,
nodeRecord
);
if
(
c_lcpState
.
m_participatingLQH
.
get
(
nodePtr
.
i
))
{
if
(
replicaPtr
.
p
->
lcpOngoingFlag
&&
if
(
replicaPtr
.
p
->
lcpOngoingFlag
&&
replicaPtr
.
p
->
lcpIdStarted
<
lcpId
)
{
replicaPtr
.
p
->
lcpIdStarted
<
lcpId
)
{
jam
();
jam
();
//-------------------------------------------------------------------
//-------------------------------------------------------------------
// We have found a replica on a node that performs local checkpoint
// We have found a replica on a node that performs local checkpoint
// that is alive and that have not yet been started.
// that is alive and that have not yet been started.
//-------------------------------------------------------------------
//-------------------------------------------------------------------
if
(
nodePtr
.
p
->
noOfStartedChkpt
<
2
)
{
if
(
nodePtr
.
p
->
noOfStartedChkpt
<
2
)
{
jam
();
jam
();
/**
/**
* Send LCP_FRAG_ORD to LQH
* Send LCP_FRAG_ORD to LQH
...
@@ -10041,7 +10045,9 @@ void Dbdih::startNextChkpt(Signal* signal)
...
@@ -10041,7 +10045,9 @@ void Dbdih::startNextChkpt(Signal* signal)
nodePtr
.
p
->
noOfStartedChkpt
=
i
+
1
;
nodePtr
.
p
->
noOfStartedChkpt
=
i
+
1
;
sendLCP_FRAG_ORD
(
signal
,
nodePtr
.
p
->
startedChkpt
[
i
]);
sendLCP_FRAG_ORD
(
signal
,
nodePtr
.
p
->
startedChkpt
[
i
]);
}
else
if
(
nodePtr
.
p
->
noOfQueuedChkpt
<
2
)
{
}
else
if
(
nodePtr
.
p
->
noOfQueuedChkpt
<
2
)
{
jam
();
jam
();
/**
/**
* Put LCP_FRAG_ORD "in queue"
* Put LCP_FRAG_ORD "in queue"
...
@@ -10057,10 +10063,13 @@ void Dbdih::startNextChkpt(Signal* signal)
...
@@ -10057,10 +10063,13 @@ void Dbdih::startNextChkpt(Signal* signal)
nodePtr
.
p
->
queuedChkpt
[
i
].
fragId
=
curr
.
fragmentId
;
nodePtr
.
p
->
queuedChkpt
[
i
].
fragId
=
curr
.
fragmentId
;
nodePtr
.
p
->
queuedChkpt
[
i
].
replicaPtr
=
replicaPtr
.
i
;
nodePtr
.
p
->
queuedChkpt
[
i
].
replicaPtr
=
replicaPtr
.
i
;
nodePtr
.
p
->
noOfQueuedChkpt
=
i
+
1
;
nodePtr
.
p
->
noOfQueuedChkpt
=
i
+
1
;
}
else
{
}
else
{
jam
();
jam
();
if
(
save
){
if
(
save
)
{
/**
/**
* Stop increasing value on first that was "full"
* Stop increasing value on first that was "full"
*/
*/
...
@@ -10069,7 +10078,8 @@ void Dbdih::startNextChkpt(Signal* signal)
...
@@ -10069,7 +10078,8 @@ void Dbdih::startNextChkpt(Signal* signal)
}
}
busyNodes
.
set
(
nodePtr
.
i
);
busyNodes
.
set
(
nodePtr
.
i
);
if
(
busyNodes
.
count
()
==
lcpNodes
){
if
(
busyNodes
.
count
()
==
lcpNodes
)
{
/**
/**
* There were no possibility to start the local checkpoint
* There were no possibility to start the local checkpoint
* and it was not possible to queue it up. In this case we
* and it was not possible to queue it up. In this case we
...
@@ -10082,6 +10092,7 @@ void Dbdih::startNextChkpt(Signal* signal)
...
@@ -10082,6 +10092,7 @@ void Dbdih::startNextChkpt(Signal* signal)
}
//if
}
//if
}
}
}
//while
}
//while
}
curr
.
fragmentId
++
;
curr
.
fragmentId
++
;
if
(
curr
.
fragmentId
>=
tabPtr
.
p
->
totalfragments
)
{
if
(
curr
.
fragmentId
>=
tabPtr
.
p
->
totalfragments
)
{
jam
();
jam
();
...
...
storage/ndb/src/ndbapi/NdbScanOperation.cpp
View file @
e609add7
...
@@ -694,9 +694,27 @@ void NdbScanOperation::close(bool forceSend, bool releaseOp)
...
@@ -694,9 +694,27 @@ void NdbScanOperation::close(bool forceSend, bool releaseOp)
theNdbCon
=
NULL
;
theNdbCon
=
NULL
;
m_transConnection
=
NULL
;
m_transConnection
=
NULL
;
if
(
releaseOp
&&
tTransCon
)
{
if
(
tTransCon
)
{
NdbIndexScanOperation
*
tOp
=
(
NdbIndexScanOperation
*
)
this
;
NdbIndexScanOperation
*
tOp
=
(
NdbIndexScanOperation
*
)
this
;
tTransCon
->
releaseScanOperation
(
tOp
);
bool
ret
=
true
;
if
(
theStatus
!=
WaitResponse
)
{
/**
* Not executed yet
*/
ret
=
tTransCon
->
releaseScanOperation
(
&
tTransCon
->
m_theFirstScanOperation
,
&
tTransCon
->
m_theLastScanOperation
,
tOp
);
}
else
if
(
releaseOp
)
{
ret
=
tTransCon
->
releaseScanOperation
(
&
tTransCon
->
m_firstExecutedScanOp
,
0
,
tOp
);
}
assert
(
ret
);
}
}
tCon
->
theScanningOp
=
0
;
tCon
->
theScanningOp
=
0
;
...
...
storage/ndb/src/ndbapi/NdbTransaction.cpp
View file @
e609add7
...
@@ -979,50 +979,59 @@ Remark: Release scan op when hupp'ed trans closed (save memory)
...
@@ -979,50 +979,59 @@ Remark: Release scan op when hupp'ed trans closed (save memory)
void
void
NdbTransaction
::
releaseScanOperation
(
NdbIndexScanOperation
*
cursorOp
)
NdbTransaction
::
releaseScanOperation
(
NdbIndexScanOperation
*
cursorOp
)
{
{
DBUG_ENTER
(
"NdbTransaction::releaseScanOperation"
);
DBUG_ENTER
(
"NdbTransaction::release
Executed
ScanOperation"
);
DBUG_PRINT
(
"enter"
,
(
"this=0x%x op=0x%x"
,
(
UintPtr
)
this
,
(
UintPtr
)
cursorOp
));
DBUG_PRINT
(
"enter"
,
(
"this=0x%x op=0x%x"
,
(
UintPtr
)
this
,
(
UintPtr
)
cursorOp
));
// here is one reason to make op lists doubly linked
releaseScanOperation
(
&
m_firstExecutedScanOp
,
0
,
cursorOp
);
if
(
cursorOp
->
m_executed
)
DBUG_VOID_RETURN
;
}
//NdbTransaction::releaseExecutedScanOperation()
bool
NdbTransaction
::
releaseScanOperation
(
NdbIndexScanOperation
**
listhead
,
NdbIndexScanOperation
**
listtail
,
NdbIndexScanOperation
*
op
)
{
if
(
*
listhead
==
op
)
{
{
if
(
m_firstExecutedScanOp
==
cursorOp
)
{
*
listhead
=
(
NdbIndexScanOperation
*
)
op
->
theNext
;
m_firstExecutedScanOp
=
(
NdbIndexScanOperation
*
)
cursorOp
->
theNext
;
if
(
listtail
&&
*
listtail
==
op
)
cursorOp
->
release
();
{
theNdb
->
releaseScanOperation
(
cursorOp
);
assert
(
*
listhead
==
0
);
}
else
if
(
m_firstExecutedScanOp
!=
NULL
)
{
*
listtail
=
0
;
NdbIndexScanOperation
*
tOp
=
m_firstExecutedScanOp
;
while
(
tOp
->
theNext
!=
NULL
)
{
if
(
tOp
->
theNext
==
cursorOp
)
{
tOp
->
theNext
=
cursorOp
->
theNext
;
cursorOp
->
release
();
theNdb
->
releaseScanOperation
(
cursorOp
);
break
;
}
tOp
=
(
NdbIndexScanOperation
*
)
tOp
->
theNext
;
}
}
}
}
}
else
else
{
{
if
(
m_theFirstScanOperation
==
cursorOp
)
{
NdbIndexScanOperation
*
tmp
=
*
listhead
;
m_theFirstScanOperation
=
(
NdbIndexScanOperation
*
)
cursorOp
->
theNext
;
while
(
tmp
!=
NULL
)
cursorOp
->
release
();
{
theNdb
->
releaseScanOperation
(
cursorOp
);
if
(
tmp
->
theNext
==
op
)
}
else
if
(
m_theFirstScanOperation
!=
NULL
)
{
{
NdbIndexScanOperation
*
tOp
=
m_theFirstScanOperation
;
tmp
->
theNext
=
(
NdbIndexScanOperation
*
)
op
->
theNext
;
while
(
tOp
->
theNext
!=
NULL
)
{
if
(
listtail
&&
*
listtail
==
op
)
if
(
tOp
->
theNext
==
cursorOp
)
{
{
tOp
->
theNext
=
cursorOp
->
theNext
;
assert
(
op
->
theNext
==
0
)
;
cursorOp
->
release
()
;
*
listtail
=
tmp
;
theNdb
->
releaseScanOperation
(
cursorOp
);
}
break
;
break
;
}
}
tOp
=
(
NdbIndexScanOperation
*
)
tO
p
->
theNext
;
tmp
=
(
NdbIndexScanOperation
*
)
tm
p
->
theNext
;
}
}
if
(
tmp
==
NULL
)
op
=
NULL
;
}
}
if
(
op
!=
NULL
)
{
op
->
release
();
theNdb
->
releaseScanOperation
(
op
);
return
true
;
}
}
DBUG_VOID_RETURN
;
}
//NdbTransaction::releaseScanOperation()
return
false
;
}
/*****************************************************************************
/*****************************************************************************
NdbOperation* getNdbOperation(const char* aTableName);
NdbOperation* getNdbOperation(const char* aTableName);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment