report bytes saved to disk.

if thread crashes try to dump core.
This commit is contained in:
Matt Wells
2015-09-23 15:40:30 -07:00
parent 98744889e2
commit 3dcaf414db
3 changed files with 7 additions and 6 deletions

@ -1386,9 +1386,9 @@ bool Loop::runLoop ( ) {
if ( m_shutdown == 2 ) {
//log(0,"Thread is saving & shutting down urgently.");
//while ( 1 == 1 ) sleep (50000);
log("loop: Resuming despite thread crash.");
m_shutdown = 0;
goto BIGLOOP;
//log("loop: Resuming despite thread crash.");
//m_shutdown = 0;
//goto BIGLOOP;
}
// otherwise, thread did not save, so we must do it
log ( LOG_INIT ,"loop: Saving and shutting down urgently.");

@ -2467,8 +2467,8 @@ void threadDoneWrapper ( void *state , ThreadEntry *t ) {
THIS->m_dbname,mstrerror(g_errno));
else
// log it
log("db: Done saving %s/%s-saved.dat",
THIS->m_dir,THIS->m_dbname);
log("db: Done saving %s/%s-saved.dat (wrote %"INT64" bytes)",
THIS->m_dir,THIS->m_dbname,THIS->m_bytesWritten);
// . call callback
if ( THIS->m_callback ) THIS->m_callback ( THIS->m_state );
}

@ -4782,7 +4782,8 @@ bool SpiderColl::scanListForWinners ( ) {
// firstip in the record!
if ( sreq->m_firstIp != firstIp ) {
log("spider: request %s firstip does not match "
"firstip in key",sreq->m_url);
"firstip in key collnum=%i",sreq->m_url,
(int)m_collnum);
log("spider: ip1=%s",iptoa(sreq->m_firstIp));
log("spider: ip2=%s",iptoa(firstIp));
continue;