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
5e154e57
Commit
5e154e57
authored
May 26, 2004
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug#3847
parent
ba1fb581
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
28 deletions
+34
-28
ndb/src/kernel/blocks/dblqh/Dblqh.hpp
ndb/src/kernel/blocks/dblqh/Dblqh.hpp
+0
-1
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
+34
-27
No files found.
ndb/src/kernel/blocks/dblqh/Dblqh.hpp
View file @
5e154e57
...
@@ -560,7 +560,6 @@ public:
...
@@ -560,7 +560,6 @@ public:
UintR
scanLocalFragid
;
UintR
scanLocalFragid
;
UintR
scanSchemaVersion
;
UintR
scanSchemaVersion
;
Uint32
fragPtrI
;
Uint32
fragPtrI
;
UintR
scanSearchCondFalseCount
;
UintR
scanStoredProcId
;
UintR
scanStoredProcId
;
ScanState
scanState
;
ScanState
scanState
;
UintR
scanTcrec
;
UintR
scanTcrec
;
...
...
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
View file @
5e154e57
...
@@ -2064,8 +2064,6 @@ void Dblqh::execTIME_SIGNAL(Signal* signal)
...
@@ -2064,8 +2064,6 @@ void Dblqh::execTIME_SIGNAL(Signal* signal)
<<
" scanLocalFragid="
<<
TscanPtr
.
p
->
scanLocalFragid
<<
" scanLocalFragid="
<<
TscanPtr
.
p
->
scanLocalFragid
<<
endl
;
<<
endl
;
ndbout
<<
" scanSchemaVersion="
<<
TscanPtr
.
p
->
scanSchemaVersion
ndbout
<<
" scanSchemaVersion="
<<
TscanPtr
.
p
->
scanSchemaVersion
<<
" scanSearchCondFalseCount="
<<
TscanPtr
.
p
->
scanSearchCondFalseCount
<<
" scanStoredProcId="
<<
TscanPtr
.
p
->
scanStoredProcId
<<
" scanStoredProcId="
<<
TscanPtr
.
p
->
scanStoredProcId
<<
" scanTcrec="
<<
TscanPtr
.
p
->
scanTcrec
<<
" scanTcrec="
<<
TscanPtr
.
p
->
scanTcrec
<<
endl
;
<<
endl
;
...
@@ -7099,14 +7097,26 @@ void Dblqh::scanLockReleasedLab(Signal* signal)
...
@@ -7099,14 +7097,26 @@ void Dblqh::scanLockReleasedLab(Signal* signal)
sendScanFragConf
(
signal
,
ZFALSE
);
sendScanFragConf
(
signal
,
ZFALSE
);
}
else
{
}
else
{
jam
();
jam
();
/*
We came here after releasing locks after receiving SCAN_NEXTREQ from TC. We only
come here when scanHoldLock == ZTRUE
*/
continueScanNextReqLab
(
signal
);
continueScanNextReqLab
(
signal
);
}
//if
}
//if
}
else
{
}
else
if
(
scanptr
.
p
->
scanReleaseCounter
<
scanptr
.
p
->
scanCompletedOperations
)
{
ndbrequire
(
scanptr
.
p
->
scanReleaseCounter
<=
scanptr
.
p
->
scanCompletedOperations
);
jam
();
jam
();
scanptr
.
p
->
scanReleaseCounter
++
;
scanptr
.
p
->
scanReleaseCounter
++
;
scanReleaseLocksLab
(
signal
);
scanReleaseLocksLab
(
signal
);
}
else
{
jam
();
/*
We come here when we have been scanning for a long time and not been able
to find scanConcurrentOperations records to return. We needed to release
the record we didn't want, but now we are returning all found records to
the API.
*/
scanptr
.
p
->
scanState
=
ScanRecord
::
WAIT_SCAN_NEXTREQ
;
sendScanFragConf
(
signal
,
ZFALSE
);
}
//if
}
//if
}
//Dblqh::scanLockReleasedLab()
}
//Dblqh::scanLockReleasedLab()
...
@@ -8000,28 +8010,28 @@ void Dblqh::scanTupkeyRefLab(Signal* signal)
...
@@ -8000,28 +8010,28 @@ void Dblqh::scanTupkeyRefLab(Signal* signal)
scanReleaseLocksLab
(
signal
);
scanReleaseLocksLab
(
signal
);
return
;
return
;
}
//if
}
//if
Uint32
time_passed
=
tcConnectptr
.
p
->
tcTimer
-
cLqhTimeOutCount
;
if
(
scanptr
.
p
->
scanCompletedOperations
>
0
)
{
if
(
time_passed
>
1
)
{
/* -----------------------------------------------------------------------
/* -----------------------------------------------------------------------
* WE NEED TO ENSURE THAT WE DO NOT SEARCH FOR THE NEXT TUPLE FOR A
* WE NEED TO ENSURE THAT WE DO NOT SEARCH FOR THE NEXT TUPLE FOR A
* LONG TIME WHILE WE KEEP A LOCK ON A FOUND TUPLE. WE RATHER REPORT
* LONG TIME WHILE WE KEEP A LOCK ON A FOUND TUPLE. WE RATHER REPORT
* THE FOUND TUPLE IF FOUND TUPLES ARE RARE.
WE SELECT 20 TUPLES
* THE FOUND TUPLE IF FOUND TUPLES ARE RARE.
If more than 10 ms passed we
*
WHICH SHOULD BE ROUGHLY 10 MS OF LOCK HOLD TIME
.
*
send the found tuples to the API
.
* ----------------------------------------------------------------------- */
* ----------------------------------------------------------------------- */
scanptr
.
p
->
scanSearchCondFalseCount
++
;
scanptr
.
p
->
scanReleaseCounter
=
scanptr
.
p
->
scanCompletedOperations
+
1
;
#if 0
scanReleaseLocksLab
(
signal
);
// MASV Uncomment this feature since it forgets
// to release on operation record in DBACC
// This is the quick fix and should be changed in
// the future
if (scanptr.p->scanSearchCondFalseCount > 20) {
if (scanptr.p->scanCompletedOperations > 0) {
jam();
scanptr.p->scanState = ScanRecord::WAIT_SCAN_NEXTREQ;
sendScanFragConf(signal, ZFALSE);
return
;
return
;
}//if
}
}//if
}
else
{
#endif
if
(
time_passed
>
10
)
{
jam
();
signal
->
theData
[
0
]
=
scanptr
.
i
;
signal
->
theData
[
1
]
=
tcConnectptr
.
p
->
transid
[
0
];
signal
->
theData
[
2
]
=
tcConnectptr
.
p
->
transid
[
1
];
execSCAN_HBREP
(
signal
);
}
}
scanptr
.
p
->
scanFlag
=
NextScanReq
::
ZSCAN_NEXT_ABORT
;
scanptr
.
p
->
scanFlag
=
NextScanReq
::
ZSCAN_NEXT_ABORT
;
scanNextLoopLab
(
signal
);
scanNextLoopLab
(
signal
);
}
//Dblqh::scanTupkeyRefLab()
}
//Dblqh::scanTupkeyRefLab()
...
@@ -8179,7 +8189,6 @@ Uint32 Dblqh::initScanrec(const ScanFragReq* scanFragReq)
...
@@ -8179,7 +8189,6 @@ Uint32 Dblqh::initScanrec(const ScanFragReq* scanFragReq)
scanptr
.
p
->
scanLockMode
=
scanLockMode
;
scanptr
.
p
->
scanLockMode
=
scanLockMode
;
scanptr
.
p
->
readCommitted
=
readCommitted
;
scanptr
.
p
->
readCommitted
=
readCommitted
;
scanptr
.
p
->
rangeScan
=
idx
;
scanptr
.
p
->
rangeScan
=
idx
;
scanptr
.
p
->
scanSearchCondFalseCount
=
0
;
scanptr
.
p
->
scanState
=
ScanRecord
::
SCAN_FREE
;
scanptr
.
p
->
scanState
=
ScanRecord
::
SCAN_FREE
;
scanptr
.
p
->
scanFlag
=
ZFALSE
;
scanptr
.
p
->
scanFlag
=
ZFALSE
;
scanptr
.
p
->
scanLocalref
[
0
]
=
0
;
scanptr
.
p
->
scanLocalref
[
0
]
=
0
;
...
@@ -8480,7 +8489,6 @@ void Dblqh::sendKeyinfo20(Signal* signal,
...
@@ -8480,7 +8489,6 @@ void Dblqh::sendKeyinfo20(Signal* signal,
* ------------------------------------------------------------------------ */
* ------------------------------------------------------------------------ */
void
Dblqh
::
sendScanFragConf
(
Signal
*
signal
,
Uint32
scanCompleted
)
void
Dblqh
::
sendScanFragConf
(
Signal
*
signal
,
Uint32
scanCompleted
)
{
{
scanptr
.
p
->
scanSearchCondFalseCount
=
0
;
scanptr
.
p
->
scanTcWaiting
=
ZFALSE
;
scanptr
.
p
->
scanTcWaiting
=
ZFALSE
;
ScanFragConf
*
conf
=
(
ScanFragConf
*
)
&
signal
->
theData
[
0
];
ScanFragConf
*
conf
=
(
ScanFragConf
*
)
&
signal
->
theData
[
0
];
...
@@ -17956,11 +17964,10 @@ Dblqh::execDUMP_STATE_ORD(Signal* signal)
...
@@ -17956,11 +17964,10 @@ Dblqh::execDUMP_STATE_ORD(Signal* signal)
sp
.
p
->
scanAiLength
,
sp
.
p
->
scanAiLength
,
sp
.
p
->
scanCompletedOperations
,
sp
.
p
->
scanCompletedOperations
,
sp
.
p
->
scanConcurrentOperations
);
sp
.
p
->
scanConcurrentOperations
);
infoEvent
(
" errCnt=%d, localFid=%d, schV=%d
, searcCondFalseC=%d
"
,
infoEvent
(
" errCnt=%d, localFid=%d, schV=%d"
,
sp
.
p
->
scanErrorCounter
,
sp
.
p
->
scanErrorCounter
,
sp
.
p
->
scanLocalFragid
,
sp
.
p
->
scanLocalFragid
,
sp
.
p
->
scanSchemaVersion
,
sp
.
p
->
scanSchemaVersion
);
sp
.
p
->
scanSearchCondFalseCount
);
infoEvent
(
" stpid=%d, flag=%d, lhold=%d, lmode=%d, num=%d"
,
infoEvent
(
" stpid=%d, flag=%d, lhold=%d, lmode=%d, num=%d"
,
sp
.
p
->
scanStoredProcId
,
sp
.
p
->
scanStoredProcId
,
sp
.
p
->
scanFlag
,
sp
.
p
->
scanFlag
,
...
...
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