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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
2eb5c010
Commit
2eb5c010
authored
Jul 12, 2005
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug#9961 more printouts
parent
67e2a864
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
111 additions
and
2 deletions
+111
-2
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
+8
-0
ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
+61
-0
ndb/src/kernel/blocks/ndbfs/AsyncFile.hpp
ndb/src/kernel/blocks/ndbfs/AsyncFile.hpp
+3
-0
ndb/src/kernel/blocks/ndbfs/CircularIndex.hpp
ndb/src/kernel/blocks/ndbfs/CircularIndex.hpp
+2
-2
ndb/src/kernel/blocks/ndbfs/MemoryChannel.hpp
ndb/src/kernel/blocks/ndbfs/MemoryChannel.hpp
+12
-0
ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp
ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp
+25
-0
No files found.
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
View file @
2eb5c010
...
...
@@ -10334,6 +10334,14 @@ void Dbdih::crashSystemAtGcpStop(Signal* signal)
file1Ptr
.
p
->
fileStatus
,
file1Ptr
.
p
->
fileType
,
file1Ptr
.
p
->
reqStatus
);
signal
->
theData
[
0
]
=
404
;
signal
->
theData
[
1
]
=
file0Ptr
.
p
->
fileRef
;
EXECUTE_DIRECT
(
NDBFS
,
GSN_DUMP_STATE_ORD
,
signal
,
2
);
signal
->
theData
[
0
]
=
404
;
signal
->
theData
[
1
]
=
file1Ptr
.
p
->
fileRef
;
EXECUTE_DIRECT
(
NDBFS
,
GSN_DUMP_STATE_ORD
,
signal
,
2
);
ndbout_c
(
"c_COPY_GCIREQ_Counter = %s"
,
c_COPY_GCIREQ_Counter
.
getText
());
ndbout_c
(
"c_COPY_TABREQ_Counter = %s"
,
...
...
ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
View file @
2eb5c010
...
...
@@ -96,6 +96,7 @@ AsyncFile::AsyncFile() :
theReportTo
(
0
),
theMemoryChannelPtr
(
NULL
)
{
m_current_request
=
m_last_request
=
0
;
}
void
...
...
@@ -177,6 +178,7 @@ AsyncFile::run()
endReq
();
return
;
}
//if
m_current_request
=
request
;
switch
(
request
->
action
)
{
case
Request
:
:
open
:
openReq
(
request
);
...
...
@@ -226,6 +228,8 @@ AsyncFile::run()
abort
();
break
;
}
//switch
m_last_request
=
request
;
m_current_request
=
0
;
theReportTo
->
writeChannel
(
request
);
}
//while
}
//AsyncFile::run()
...
...
@@ -1031,3 +1035,60 @@ void printErrorAndFlags(Uint32 used_flags) {
}
#endif
NdbOut
&
operator
<<
(
NdbOut
&
out
,
const
Request
&
req
)
{
out
<<
"[ Request: file: "
<<
hex
<<
req
.
file
<<
" userRef: "
<<
hex
<<
req
.
theUserReference
<<
" userData: "
<<
dec
<<
req
.
theUserPointer
<<
" theFilePointer: "
<<
req
.
theFilePointer
<<
" action: "
;
switch
(
req
.
action
){
case
Request
:
:
open
:
out
<<
"open"
;
break
;
case
Request
:
:
close
:
out
<<
"close"
;
break
;
case
Request
:
:
closeRemove
:
out
<<
"closeRemove"
;
break
;
case
Request
:
:
read
:
// Allways leave readv directly after
out
<<
"read"
;
break
;
case
Request
:
:
readv
:
out
<<
"readv"
;
break
;
case
Request
:
:
write
:
// Allways leave writev directly after
out
<<
"write"
;
break
;
case
Request
:
:
writev
:
out
<<
"writev"
;
break
;
case
Request
:
:
writeSync
:
// Allways leave writevSync directly after
out
<<
"writeSync"
;
break
;
// writeSync because SimblockAsyncFileSystem depends on it
case
Request
:
:
writevSync
:
out
<<
"writevSync"
;
break
;
case
Request
:
:
sync
:
out
<<
"sync"
;
break
;
case
Request
:
:
end
:
out
<<
"end"
;
break
;
case
Request
:
:
append
:
out
<<
"append"
;
break
;
case
Request
:
:
rmrf
:
out
<<
"rmrf"
;
break
;
default:
out
<<
(
Uint32
)
req
.
action
;
break
;
}
out
<<
" ]"
;
return
out
;
}
ndb/src/kernel/blocks/ndbfs/AsyncFile.hpp
View file @
2eb5c010
...
...
@@ -160,6 +160,7 @@ public:
Uint32
theTrace
;
}
;
NdbOut
&
operator
<<
(
NdbOut
&
,
const
Request
&
);
inline
void
...
...
@@ -173,6 +174,7 @@ Request::set(BlockReference userReference,
class
AsyncFile
{
friend
class
Ndbfs
;
public:
AsyncFile
();
~
AsyncFile
();
...
...
@@ -188,6 +190,7 @@ public:
bool
isOpen
();
Filename
theFileName
;
Request
*
m_current_request
,
*
m_last_request
;
private:
void
openReq
(
Request
*
request
);
...
...
ndb/src/kernel/blocks/ndbfs/CircularIndex.hpp
View file @
2eb5c010
...
...
@@ -68,7 +68,7 @@ class CircularIndex
{
public:
inline
CircularIndex
(
int
start
=
0
,
int
size
=
256
);
operator
int
();
operator
int
()
const
;
CircularIndex
&
operator
++
();
friend
int
full
(
const
CircularIndex
&
write
,
const
CircularIndex
&
read
);
friend
int
empty
(
const
CircularIndex
&
write
,
const
CircularIndex
&
read
);
...
...
@@ -77,7 +77,7 @@ private:
int
theIndex
;
};
inline
CircularIndex
::
operator
int
()
inline
CircularIndex
::
operator
int
()
const
{
return
theIndex
;
}
...
...
ndb/src/kernel/blocks/ndbfs/MemoryChannel.hpp
View file @
2eb5c010
...
...
@@ -96,8 +96,20 @@ private:
NdbMutex
*
theMutexPtr
;
NdbCondition
*
theConditionPtr
;
template
<
class
U
>
friend
NdbOut
&
operator
<<
(
NdbOut
&
out
,
const
MemoryChannel
<
U
>
&
chn
);
};
template
<
class
T
>
NdbOut
&
operator
<<
(
NdbOut
&
out
,
const
MemoryChannel
<
T
>
&
chn
)
{
NdbMutex_Lock
(
chn
.
theMutexPtr
);
out
<<
"[ theSize: "
<<
chn
.
theSize
<<
" theReadIndex: "
<<
(
int
)
chn
.
theReadIndex
<<
" theWriteIndex: "
<<
(
int
)
chn
.
theWriteIndex
<<
" ]"
;
NdbMutex_Unlock
(
chn
.
theMutexPtr
);
return
out
;
}
template
<
class
T
>
MemoryChannel
<
T
>::
MemoryChannel
(
int
size
)
:
theSize
(
size
),
...
...
ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp
View file @
2eb5c010
...
...
@@ -1006,6 +1006,30 @@ Ndbfs::execDUMP_STATE_ORD(Signal* signal)
}
return
;
}
if
(
signal
->
theData
[
0
]
==
404
)
{
ndbrequire
(
signal
->
getLength
()
==
2
);
Uint32
file
=
signal
->
theData
[
1
];
AsyncFile
*
openFile
=
theOpenFiles
.
find
(
file
);
ndbrequire
(
openFile
);
ndbout_c
(
"File: %s %p"
,
openFile
->
theFileName
.
c_str
(),
openFile
);
Request
*
curr
=
openFile
->
m_current_request
;
Request
*
last
=
openFile
->
m_last_request
;
if
(
curr
)
ndbout
<<
"Current request: "
<<
*
curr
<<
endl
;
if
(
last
)
ndbout
<<
"Last request: "
<<
*
last
<<
endl
;
ndbout
<<
"theReportTo "
<<
*
openFile
->
theReportTo
<<
endl
;
ndbout
<<
"theMemoryChannelPtr"
<<
*
openFile
->
theMemoryChannelPtr
<<
endl
;
ndbout
<<
"All files: "
<<
endl
;
for
(
unsigned
i
=
0
;
i
<
theFiles
.
size
();
i
++
){
AsyncFile
*
file
=
theFiles
[
i
];
ndbout_c
(
"%2d (0x%x): %s"
,
i
,
file
,
file
->
isOpen
()
?
"OPEN"
:
"CLOSED"
);
}
}
}
//Ndbfs::execDUMP_STATE_ORD()
...
...
@@ -1016,3 +1040,4 @@ template class Vector<AsyncFile*>;
template
class
Vector
<
OpenFiles
::
OpenFileItem
>;
template
class
MemoryChannel
<
Request
>;
template
class
Pool
<
Request
>;
template
NdbOut
&
operator
<<
(
NdbOut
&
,
const
MemoryChannel
<
Request
>
&
);
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