Skip to content

Commit

Permalink
HPCC-32727 Thor logging/audience review stage2
Browse files Browse the repository at this point in the history
Signed-off-by: Jake Smith <[email protected]>
  • Loading branch information
jakesmith committed Sep 26, 2024
1 parent 8962146 commit 42683c5
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion thorlcr/activities/hashdistrib/thhashdistribslave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2325,7 +2325,7 @@ class CHDRproportional: implements IHash, public CSimpleInterface
GetTempFilePath(tempname,"hdprop");
tempfile.setown(createIFile(tempname.str()));
{
ActPrintLogEx(&activity->queryContainer(), thorlog_null, MCwarning, "REDISTRIBUTE size unknown, spilling to disk");
ActPrintLogEx(&activity->queryContainer(), thorlog_null, MCdebugWarning, "REDISTRIBUTE size unknown, spilling to disk");
MemoryAttr ma;
if (activity->getOptBool(THOROPT_COMPRESS_SPILLS, true))
{
Expand Down
2 changes: 1 addition & 1 deletion thorlcr/activities/join/thjoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ class JoinActivityMaster : public CMasterActivity
{
if (e->errorCode()!=MPERR_link_closed)
throw;
ActPrintLogEx(&queryContainer(), thorlog_null, MCwarning, "WARNING: MPERR_link_closed in SortDone");
ActPrintLogEx(&queryContainer(), thorlog_null, MCdebugWarning, "WARNING: MPERR_link_closed in SortDone");
e->Release();
}
::Release(imaster);
Expand Down
2 changes: 1 addition & 1 deletion thorlcr/activities/merge/thmergeslave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ class GlobalMergeSlaveActivity : public CSlaveActivity
if (!r)
break;
if (pos+l>end) {
ActPrintLogEx(&queryContainer(), thorlog_null, MCwarning, "overrun in GlobalMergeSlaveActivity::getRows(%u,%" I64F "d,%" I64F "d)",l,rs->getOffset(),end);
ActPrintLogEx(&queryContainer(), thorlog_null, MCdebugWarning, "overrun in GlobalMergeSlaveActivity::getRows(%u,%" I64F "d,%" I64F "d)",l,rs->getOffset(),end);
break; // don't think should happen
}
len = l;
Expand Down
2 changes: 1 addition & 1 deletion thorlcr/activities/msort/thmsortslave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class MSortSlaveActivity : public CSlaveActivity
PARENT::stopInput(0);
if (abortSoon)
{
ActPrintLogEx(&queryContainer(), thorlog_null, MCwarning, "MSortSlaveActivity::start aborting");
ActPrintLogEx(&queryContainer(), thorlog_null, MCdebugWarning, "MSortSlaveActivity::start aborting");
barrier->cancel();
return;
}
Expand Down
6 changes: 3 additions & 3 deletions thorlcr/activities/thdiskbaseslave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,8 @@ void CDiskWriteSlaveActivityBase::removeFiles()
return;
Owned<IFile> primary = createIFile(fName);
try { primary->remove(); }
catch (IException *e) { ActPrintLogEx(&queryContainer(), e, thorlog_null, MCwarning, "Failed to remove file: %s", fName.get()); }
catch (CATCHALL) { ActPrintLogEx(&queryContainer(), thorlog_null, MCwarning, "Failed to remove: %s", fName.get()); }
catch (IException *e) { ActPrintLogEx(&queryContainer(), e, thorlog_null, MCoperatorWarning, "Failed to remove file: %s", fName.get()); }
catch (CATCHALL) { ActPrintLogEx(&queryContainer(), thorlog_null, MCoperatorWarning, "Failed to remove: %s", fName.get()); }
}

void CDiskWriteSlaveActivityBase::close()
Expand Down Expand Up @@ -495,7 +495,7 @@ void CDiskWriteSlaveActivityBase::close()
}
catch (IException *e)
{
ActPrintLogEx(&queryContainer(), e, thorlog_null, MCwarning, "Error closing file: %s", fName.get());
ActPrintLogEx(&queryContainer(), e, thorlog_null, MCoperatorWarning, "Error closing file: %s", fName.get());
abortSoon = true;
removeFiles();
throw e;
Expand Down
4 changes: 2 additions & 2 deletions thorlcr/graph/thgraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2329,7 +2329,7 @@ void CGraphTempHandler::deregisterFile(const char *name, bool kept)
if (!removeTemp(name))
IWARNLOG("Failed to delete tmp file : %s (not found)", name);
}
catch (IException *e) { StringBuffer s("Failed to delete tmp file : "); FLLOG(MCwarning, e, s.append(name).str()); }
catch (IException *e) { StringBuffer s("Failed to delete tmp file : "); FLLOG(MCoperatorWarning, e, s.append(name).str()); }
}
else
fileUsage->decUsage();
Expand All @@ -2348,7 +2348,7 @@ void CGraphTempHandler::clearTemps()
if (!removeTemp(tmpname))
IWARNLOG("Failed to delete tmp file : %s (not found)", tmpname);
}
catch (IException *e) { StringBuffer s("Failed to delete tmp file : "); FLLOG(MCwarning, e, s.append(tmpname).str()); }
catch (IException *e) { StringBuffer s("Failed to delete tmp file : "); FLLOG(MCoperatorWarning, e, s.append(tmpname).str()); }
}
iter.clear();
tmpFiles.kill();
Expand Down
2 changes: 1 addition & 1 deletion thorlcr/graph/thgraphslave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ bool CSlaveGraph::recvActivityInitData(size32_t parentExtractSz, const byte *par
if (mins >= jobS->queryActInitWaitTimeMins())
throw MakeStringException(0, "Timed out after %u minutes, waiting to receive actinit data for graph: %" GIDPF "u", mins, graphId);

GraphPrintLogEx(this, thorlog_null, MCwarning, "Waited %u minutes for activity initialization message (Master may be blocked on a file lock?).", mins);
GraphPrintLogEx(this, thorlog_null, MCuserWarning, "Waited %u minutes for activity initialization message (Master may be blocked on a file lock?).", mins);
}
replyTag = msg.getReplyTag();
msg.read(len);
Expand Down
2 changes: 1 addition & 1 deletion thorlcr/master/thgraphmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ void CJobManager::setWuid(const char *wuid, const char *cluster)
}
catch (CATCHALL)
{
FLLOG(MCerror, "WARNING: Failed to set wuid in SDS: Unknown error");
FLLOG(MCdebugError, "WARNING: Failed to set wuid in SDS: Unknown error");
}
}

Expand Down
4 changes: 2 additions & 2 deletions thorlcr/slave/slave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@ void ProcessSlaveActivity::threadmain()
else
m.append("standard library exception (std::exception ").append(es.what()).append(")");
m.appendf(" in %" ACTPF "d",container.queryId());
ActPrintLogEx(&queryContainer(), thorlog_null, MCerror, "%s", m.str());
ActPrintLogEx(&queryContainer(), thorlog_null, MCdebugError, "%s", m.str());
exception.setown(MakeThorFatal(NULL, TE_UnknownException, "%s", m.str()));
}
catch (CATCHALL)
{
ActPrintLogEx(&queryContainer(), thorlog_null, MCerror, "Unknown exception thrown in process()");
ActPrintLogEx(&queryContainer(), thorlog_null, MCdebugError, "Unknown exception thrown in process()");
exception.setown(MakeThorFatal(NULL, TE_UnknownException, "FATAL: Unknown exception thrown by ProcessThread"));
}
if (exception)
Expand Down
8 changes: 4 additions & 4 deletions thorlcr/thorutil/thbuf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ class CSmartRowBuffer: public CSimpleInterface, implements ISmartRowBuffer, impl
#ifdef _DEBUG
if (waiting)
{
ActPrintLogEx(&activity->queryContainer(), thorlog_null, MCwarning, "CSmartRowBuffer::stop while nextRow waiting");
ActPrintLogEx(&activity->queryContainer(), thorlog_null, MCdebugWarning, "CSmartRowBuffer::stop while nextRow waiting");
PrintStackReport();
}
#endif
Expand Down Expand Up @@ -416,7 +416,7 @@ class CSmartRowBuffer: public CSimpleInterface, implements ISmartRowBuffer, impl
waitflush = true;
SpinUnblock unblock(lock);
while (!waitflushsem.wait(1000*60))
ActPrintLogEx(&activity->queryContainer(), thorlog_null, MCwarning, "CSmartRowBuffer::flush stalled");
ActPrintLogEx(&activity->queryContainer(), thorlog_null, MCdebugWarning, "CSmartRowBuffer::flush stalled");
}
}

Expand Down Expand Up @@ -561,7 +561,7 @@ class CSmartRowInMemoryBuffer: public CSimpleInterface, implements ISmartRowBuff
SpinBlock block(lock);
#ifdef _DEBUG
if (waitingout) {
ActPrintLogEx(&activity->queryContainer(), thorlog_null, MCwarning, "CSmartRowInMemoryBuffer::stop while nextRow waiting");
ActPrintLogEx(&activity->queryContainer(), thorlog_null, MCdebugWarning, "CSmartRowInMemoryBuffer::stop while nextRow waiting");
PrintStackReport();
}
#endif
Expand Down Expand Up @@ -599,7 +599,7 @@ class CSmartRowInMemoryBuffer: public CSimpleInterface, implements ISmartRowBuff
waitingin = true;
SpinUnblock unblock(lock);
while (!waitinsem.wait(1000*60))
ActPrintLogEx(&activity->queryContainer(), thorlog_null, MCwarning, "CSmartRowInMemoryBuffer::flush stalled");
ActPrintLogEx(&activity->queryContainer(), thorlog_null, MCdebugWarning, "CSmartRowInMemoryBuffer::flush stalled");
}
}

Expand Down
4 changes: 2 additions & 2 deletions thorlcr/thorutil/thormisc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ class CTempNameHandler
catch (IException *e)
{
if (log)
FLLOG(MCwarning, e);
FLLOG(MCoperatorWarning, e);
e->Release();
}
}
Expand Down Expand Up @@ -694,7 +694,7 @@ class CTempNameHandler
catch (IException *e)
{
if (log)
FLLOG(MCwarning, e);
FLLOG(MCoperatorWarning, e);
e->Release();
}
subDirPath.clear();
Expand Down

0 comments on commit 42683c5

Please sign in to comment.