Commit 2eb5c010 authored by unknown's avatar unknown
Browse files

bug#9961 more printouts

parent 67e2a864
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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", 
+61 −0
Original line number Diff line number Diff line
@@ -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;
}
+3 −0
Original line number Diff line number Diff line
@@ -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);
+2 −2
Original line number Diff line number Diff line
@@ -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;
}
+12 −0
Original line number Diff line number Diff line
@@ -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),
Loading