mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 11:01:52 +01:00
bug#9961 more printouts
This commit is contained in:
parent
dadfd054d0
commit
22a0df05f1
6 changed files with 111 additions and 2 deletions
|
@ -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",
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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>&);
|
||||
|
|
Loading…
Add table
Reference in a new issue