Преглед на файлове

Merge pull request #12205 from shamser/issue21520

HPCC-21520 ROXIE - Make sure audience and message class is sensible

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman преди 6 години
родител
ревизия
75515ada6f

+ 1 - 1
roxie/ccd/ccdactivities.cpp

@@ -4691,7 +4691,7 @@ public:
         {
             StringBuffer errors;
             E->errorMessage(errors);
-            DBGLOG("%s File error = %s", (isLoadDataOnly) ? "LOADDATAONLY" : "SUSPENDED QUERY", errors.str());
+            OERRLOG("%s File error = %s", (isLoadDataOnly) ? "LOADDATAONLY" : "SUSPENDED QUERY", errors.str());
             E->Release();
         }
     }

+ 1 - 1
roxie/ccd/ccdcontext.cpp

@@ -3045,7 +3045,7 @@ public:
                     e->errorMessage(msg);
                     addExceptionToWorkunit(w, SeverityError, "Roxie", code, msg.str(), NULL, 0, 0, 0);
                     e->Release();
-                    WARNLOG("%s (%d)", msg.str(), code);
+                    OWARNLOG("%s (%d)", msg.str(), code);
                 }
             }
             while (clusterNames.ordinality())

+ 8 - 8
roxie/ccd/ccdfile.cpp

@@ -342,7 +342,7 @@ public:
             {
                 EXCLOG(MCoperatorError, E, "Read error");
                 E->Release();
-                DBGLOG("Failed to read length %d offset %" I64F "x file %s", len, pos, sources.item(activeIdx).queryFilename());
+                OERRLOG("Failed to read length %d offset %" I64F "x file %s", len, pos, sources.item(activeIdx).queryFilename());
                 {
                     CriticalBlock b(crit);
                     if (currentIdx == activeIdx)
@@ -446,7 +446,7 @@ public:
                         catch(IException *E)
                         {
                             StringBuffer err;
-                            DBGLOG("HARD LINK ERROR %s", E->errorMessage(err).str());
+                            OERRLOG("HARD LINK ERROR %s", E->errorMessage(err).str());
                             E->Release();
                         }
                     }
@@ -766,7 +766,7 @@ class CRoxieFileCache : implements IRoxieFileCache, implements ICopyFileProgress
         catch(IException *E)
         {
             StringBuffer err;
-            DBGLOG("Could not remove tmp file %s", E->errorMessage(err).str());
+            OERRLOG("Could not remove tmp file %s", E->errorMessage(err).str());
             E->Release();
         }
         catch(...)
@@ -846,7 +846,7 @@ class CRoxieFileCache : implements IRoxieFileCache, implements ICopyFileProgress
             catch(...)
             {
                 f->setCopying(false);
-                DBGLOG("%s exception - remove templocal", msg);
+                IERRLOG("%s exception - remove templocal", msg);
                 destFile->remove();
                 deleteTempFiles(targetFilename);
                 throw;
@@ -893,7 +893,7 @@ class CRoxieFileCache : implements IRoxieFileCache, implements ICopyFileProgress
             else
                 destPath.append('.');
             if (!checkDirExists(destPath.str())) {
-                ERRLOG("Dest directory %s does not exist", destPath.str());
+                OERRLOG("Dest directory %s does not exist", destPath.str());
                 return false;
             }
             
@@ -1043,7 +1043,7 @@ public:
         }
         catch (...) 
         {
-            DBGLOG("Unknown exception in background copy thread");
+            IERRLOG("Unknown exception in background copy thread");
         }
         if (traceLevel)
             DBGLOG("Background copy thread %p exiting", this);
@@ -1074,7 +1074,7 @@ public:
         }
         catch (...) 
         {
-            DBGLOG("Unknown exception in handle closer thread");
+            IERRLOG("Unknown exception in handle closer thread");
         }
         if (traceLevel)
             DBGLOG("Handle closer thread %p exiting", this);
@@ -2457,7 +2457,7 @@ public:
             }
             catch (IException *e)
             {
-                ERRLOG(-1, "Error removing file %s (%s)", lfn.get(), physicalName.get());
+                OERRLOG(-1, "Error removing file %s (%s)", lfn.get(), physicalName.get());
                 e->Release();
             }
         }

+ 1 - 1
roxie/ccd/ccdlistener.cpp

@@ -1088,7 +1088,7 @@ public:
 
     virtual bool stop() override
     {
-        ERRLOG("RoxieQueryWorker stopped with queries active");
+        IERRLOG("RoxieQueryWorker stopped with queries active");
         return true;
     }
 

+ 5 - 5
roxie/ccd/ccdmain.cpp

@@ -781,12 +781,12 @@ int STARTQUERY_API start_query(int argc, const char *argv[])
         if (ttlTmp < 0)
         {
             multicastTTL = 1;
-            WARNLOG("multicastTTL value (%d) invalid, must be >=0, resetting to %u", ttlTmp, multicastTTL);
+            IWARNLOG("multicastTTL value (%d) invalid, must be >=0, resetting to %u", ttlTmp, multicastTTL);
         }
         else if (ttlTmp > 255)
         {
             multicastTTL = 255;
-            WARNLOG("multicastTTL value (%d) invalid, must be <=%u, resetting to maximum", ttlTmp, multicastTTL);
+            IWARNLOG("multicastTTL value (%d) invalid, must be <=%u, resetting to maximum", ttlTmp, multicastTTL);
         }
         else
             multicastTTL = ttlTmp;
@@ -1160,7 +1160,7 @@ int STARTQUERY_API start_query(int argc, const char *argv[])
                             if (!isEmptyString(passPhrase))
                                 decrypt(passPhraseStr, passPhrase);
     #else
-                            WARNLOG("Skipping Roxie SSL Farm Listener on port %d : OpenSSL disabled in build", port);
+                            OWARNLOG("Skipping Roxie SSL Farm Listener on port %d : OpenSSL disabled in build", port);
                             continue;
     #endif
                         }
@@ -1211,7 +1211,7 @@ int STARTQUERY_API start_query(int argc, const char *argv[])
             catch (IException *E)
             {
                 StringBuffer x;
-                DBGLOG("EXCEPTION: (%d): %s", E->errorCode(), E->errorMessage(x).str());
+                IERRLOG("EXCEPTION: (%d): %s", E->errorCode(), E->errorMessage(x).str());
                 E->Release();
             }
         }
@@ -1234,7 +1234,7 @@ int STARTQUERY_API start_query(int argc, const char *argv[])
     catch (IException *E)
     {
         StringBuffer x;
-        DBGLOG("EXCEPTION: (%d): %s", E->errorCode(), E->errorMessage(x).str());
+        IERRLOG("EXCEPTION: (%d): %s", E->errorCode(), E->errorMessage(x).str());
         E->Release();
     }
 

+ 6 - 6
roxie/ccd/ccdprotocol.cpp

@@ -334,7 +334,7 @@ public:
                     {
                         StringBuffer s;
                         E->errorMessage(s);
-                        WARNLOG("%s", s.str());
+                        OWARNLOG("%s", s.str());
                         E->Release();
                         cleanupSocket(ssock);
                         ssock.clear();
@@ -344,7 +344,7 @@ public:
                     }
                     catch (...)
                     {
-                        WARNLOG("ProtocolSocketListener failure to establish secure connection");
+                        OWARNLOG("ProtocolSocketListener failure to establish secure connection");
                         cleanupSocket(ssock);
                         ssock.clear();
                         cleanupSocket(client);
@@ -353,7 +353,7 @@ public:
                     }
                     client.setown(ssock.getClear());
 #else
-                    WARNLOG("ProtocolSocketListener failure to establish secure connection: OpenSSL disabled in build");
+                    OWARNLOG("ProtocolSocketListener failure to establish secure connection: OpenSSL disabled in build");
                     continue;
 #endif
                 }
@@ -403,7 +403,7 @@ public:
 
     virtual bool stop() override
     {
-        ERRLOG("RoxieQueryWorker stopped with queries active");
+        IERRLOG("RoxieQueryWorker stopped with queries active");
         return true;
     }
 
@@ -1394,7 +1394,7 @@ public:
         //    logctx.CTXLOG("FAILED: %s", queryText);
         StringBuffer error("EXCEPTION: ");
         E->errorMessage(error);
-        DBGLOG("%s", error.str());
+        IERRLOG("%s", error.str());
         client.checkSendHttpException(httpHelper, E, queryName);
         E->Release();
     }
@@ -1774,7 +1774,7 @@ readAnother:
             if (traceLevel > 0)
             {
                 StringBuffer b;
-                DBGLOG("Error reading query from socket: %s", E->errorMessage(b).str());
+                IERRLOG("Error reading query from socket: %s", E->errorMessage(b).str());
             }
             E->Release();
             client.clear();

+ 1 - 1
roxie/ccd/ccdquery.cpp

@@ -1246,7 +1246,7 @@ public:
                         StringBuffer m;
                         E->errorMessage(m);
                         suspend(m.str());
-                        ERRLOG("Query %s suspended: %s", id.get(), m.str());
+                        OERRLOG("Query %s suspended: %s", id.get(), m.str());
                         E->Release();
                     }
                 }

+ 3 - 3
roxie/ccd/ccdserver.cpp

@@ -531,7 +531,7 @@ public:
                 putStatsValue(&edge, "NumStarts", "sum", _started);
         }
         else
-            ERRLOG("unexpected call to getEdgeProcessInfo for output %d in activity %d", output, queryId());
+            IERRLOG("unexpected call to getEdgeProcessInfo for output %d in activity %d", output, queryId());
     }
 
     virtual void getNodeProgressInfo(IPropertyTree &node) const
@@ -8376,7 +8376,7 @@ public:
         else
         {
             if (*algorithmName)
-                WARNLOG(ROXIE_UNKNOWN_ALGORITHM, "Ignoring unsupported sort order algorithm '%s', using default", algorithmName);
+                OWARNLOG(ROXIE_UNKNOWN_ALGORITHM, "Ignoring unsupported sort order algorithm '%s', using default", algorithmName);
             if (sortFlags & TAFspill)
                 sortAlgorithm = ((sortFlags & TAFunstable) != 0) ? spillingQuickSortAlgorithm : stableSpillingQuickSortAlgorithm;
             else if (sortFlags & TAFunstable)
@@ -25051,7 +25051,7 @@ public:
         {
             StringBuffer errors;
             E->errorMessage(errors);
-            DBGLOG("%s File error = %s", (isLoadDataOnly) ? "LOADDATAONLY" : "SUSPENDED QUERY", errors.str());
+            OERRLOG("%s File error = %s", (isLoadDataOnly) ? "LOADDATAONLY" : "SUSPENDED QUERY", errors.str());
             E->Release();
         }
     }

+ 1 - 1
roxie/ccd/ccdstate.cpp

@@ -1957,7 +1957,7 @@ private:
                     }
                     catch (...)
                     {
-                        DBGLOG("Unknown exception in AutoReloadThread");
+                        IERRLOG("Unknown exception in AutoReloadThread");
                     }
                     owner.forcePending = false;
                 }

+ 2 - 2
roxie/roxiemem/roxiemem.cpp

@@ -3471,7 +3471,7 @@ void Heaplet::verifySpaceList()
 {
     if (nextSpace.load(std::memory_order_relaxed) == 0)
     {
-        ERRLOG("%p@%" I64F "u: Verify failed: %p %u", heap, (unsigned __int64)GetCurrentThreadId(), this, isFull());
+        IERRLOG("%p@%" I64F "u: Verify failed: %p %u", heap, (unsigned __int64)GetCurrentThreadId(), this, isFull());
     }
 }
 
@@ -3479,7 +3479,7 @@ void ChunkedHeaplet::verifySpaceList()
 {
     if (nextSpace.load(std::memory_order_relaxed) == 0)
     {
-        ERRLOG("%p@%" I64F "u: Verify failed: %p %u %x %x", heap, (unsigned __int64)GetCurrentThreadId(), this, isFull(), freeBase.load(), r_blocks.load());
+        IERRLOG("%p@%" I64F "u: Verify failed: %p %u %x %x", heap, (unsigned __int64)GetCurrentThreadId(), this, isFull(), freeBase.load(), r_blocks.load());
     }
 }
 

+ 9 - 9
roxie/roxiepipe/roxiepipe.cpp

@@ -279,8 +279,8 @@ public:
                         int code = ep->getPropInt("./Code", 0);
                         SocketEndpoint peerEp;
                         StringBuffer peerStr;
-                        ERRLOG("Connected to %s", roxieSock->querySocket()->getPeerEndpoint(peerEp).getUrlStr(peerStr).str());
-                        ERRLOG("Roxie exception: %s", body.str());
+                        OERRLOG("Connected to %s", roxieSock->querySocket()->getPeerEndpoint(peerEp).getUrlStr(peerStr).str());
+                        OERRLOG("Roxie exception: %s", body.str());
                         throw new ReceivedRoxieException(code, body.str());
                     }
                     else if (resultName.length() == 0 || strcmp(finger, resultName.str()) == 0)
@@ -305,8 +305,8 @@ public:
                     delete x;
                     SocketEndpoint peerEp;
                     StringBuffer peerStr;
-                    ERRLOG("Connected to %s", roxieSock->querySocket()->getPeerEndpoint(peerEp).getUrlStr(peerStr).str());
-                    ERRLOG("Roxie exception: %s", xml.str());
+                    OERRLOG("Connected to %s", roxieSock->querySocket()->getPeerEndpoint(peerEp).getUrlStr(peerStr).str());
+                    OERRLOG("Roxie exception: %s", xml.str());
                     int code = 0;
                     try
                     {
@@ -376,11 +376,11 @@ public:
                             }
                             else
                             {
-                                WARNLOG("Caught Roxie exception - retrying? (%d<%d)", attempts, maxRetries);
+                                IWARNLOG("Caught Roxie exception - retrying? (%d<%d)", attempts, maxRetries);
 
                                 if (attempts < maxRetries)
                                 {
-                                    WARNLOG("Retrying: maxRetries not exceeded");
+                                    IWARNLOG("Retrying: maxRetries not exceeded");
                                     attempts++;
                                 }
                                 else
@@ -390,7 +390,7 @@ public:
                                     Aborting = true;
                                     if (fatalError.length()==0) 
                                         e->errorMessage(fatalError);
-                                    ERRLOG("Exiting: maxRetries exceeded");
+                                    OERRLOG("Exiting: maxRetries exceeded");
                                     break;
                                 }
                             }
@@ -409,7 +409,7 @@ public:
                                 s.append(" - Failed to connect to ").append(hosts);
                                 if (fatalError.length()==0) 
                                     fatalError.append(s.str());
-                                ERRLOG("%s",s.str());
+                                OERRLOG("%s",s.str());
                                 break;
                             }
                             EXCLOG(e, "Caught exception - retrying");
@@ -714,7 +714,7 @@ int main(int argc, char *argv[])
         }
     }
     if (fatalError.length()) {
-        ERRLOG("EXIT: %s",fatalError.str());
+        OERRLOG("EXIT: %s",fatalError.str());
         fprintf(stderr, "%s\n", fatalError.str());
         fflush(stderr);
         Sleep(1000);

+ 1 - 1
roxie/udplib/udpsha.cpp

@@ -263,7 +263,7 @@ int check_set(const char *path, int value)
         si = atoi(r);
     if (!si)
     {
-        DBGLOG("WARNING: Failed to read value for %s", path);
+        OWARNLOG("WARNING: Failed to read value for %s", path);
         return 0;
     }
     else if (si<value)