List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:April 6 2011 12:49pm
Subject:bzr commit into mysql-5.1-telco-7.0 branch (jonas:4283)
View as plain text  
#At file:///home/jonas/src/telco-7.0/ based on revid:jonas@stripped

 4283 Jonas Oreland	2011-04-06
      ndb - print debug info if failing to close file

    modified:
      storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp
=== modified file 'storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp'
--- a/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp	2011-02-01 23:27:25 +0000
+++ b/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp	2011-04-06 12:49:06 +0000
@@ -42,6 +42,9 @@
 #include <NdbOut.hpp>
 #include <Configuration.hpp>
 
+#include <EventLogger.hpp>
+extern EventLogger * g_eventLogger;
+
 inline
 int pageSize( const NewVARIABLE* baseAddrRef )
 {
@@ -515,6 +518,11 @@ Ndbfs::execFSCLOSEREQ(Signal * signal)
     fsRef->setErrorCode(fsRef->errorCode, FsRef::fsErrFileDoesNotExist);
     fsRef->osErrorCode  = ~0; // Indicate local error
     sendSignal(userRef, GSN_FSCLOSEREF, signal, 3, JBB);
+
+    g_eventLogger->warning("Trying to close unknown file!! %u", userPointer);
+    g_eventLogger->warning("Dumping files");
+    signal->theData[0] = 405;
+    execDUMP_STATE_ORD(signal);
     return;
   }
 
@@ -1122,6 +1130,14 @@ Ndbfs::report(Request * request, Signal*
     case Request:: close: {
       jam();
       sendSignal(ref, GSN_FSCLOSEREF, signal, FsRef::SignalLength, JBB);
+
+      g_eventLogger->warning("Error closing file: %s %u/%u",
+                             request->file->theFileName.c_str(),
+                             fsRef->errorCode,
+                             fsRef->osErrorCode);
+      g_eventLogger->warning("Dumping files");
+      signal->theData[0] = 405;
+      execDUMP_STATE_ORD(signal);
       break;
     }
     case Request:: writeSync:
@@ -1548,6 +1564,19 @@ Ndbfs::execDUMP_STATE_ORD(Signal* signal
     }
 #endif
   }
+
+  if(signal->theData[0] == 405)
+  {
+    for (unsigned i = 0; i < theFiles.size(); i++)
+    {
+      AsyncFile* file = theFiles[i];
+      if (file == 0)
+        continue;
+      ndbout_c("%u : %s %s", i,
+               file->theFileName.c_str() ? file->theFileName.c_str() : "",
+               file->isOpen() ? "OPEN" : "CLOSED");
+    }
+  }
 }//Ndbfs::execDUMP_STATE_ORD()
 
 const char*


Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20110406124906-wfji6bnbt44abnv5.bundle
Thread
bzr commit into mysql-5.1-telco-7.0 branch (jonas:4283) Jonas Oreland6 Apr