From: Kern Sibbald Date: Sat, 1 Nov 2008 17:46:44 +0000 (+0000) Subject: Tweak debug X-Git-Tag: Release-7.0.0~3809 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=922f3d8c0b48617a0686f70bc3935e3c0f7e4b0f;p=bacula%2Fbacula Tweak debug git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7957 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/dird/autoprune.c b/bacula/src/dird/autoprune.c index a6c7ce5653..9109240762 100644 --- a/bacula/src/dird/autoprune.c +++ b/bacula/src/dird/autoprune.c @@ -107,7 +107,6 @@ void prune_volumes(JCR *jcr, bool InChanger, MEDIA_DBR *mr) prune_list.JobId = (JobId_t *)malloc(sizeof(JobId_t) * prune_list.max_ids); ua = new_ua_context(jcr); - db_lock(jcr->db); /* Edit PoolId */ @@ -154,7 +153,7 @@ void prune_volumes(JCR *jcr, bool InChanger, MEDIA_DBR *mr) goto bail_out; } - Dmsg1(100, "num_ids=%d\n", ids.num_ids); + Dmsg1(100, "Volume prune num_ids=%d\n", ids.num_ids); /* Visit each Volume and Prune it until we find one that is purged */ for (i=0; isd_msg_thread_done = true; jcr->SD_msg_chan = 0; pthread_cond_broadcast(&jcr->term_wait); /* wakeup any waiting threads */ - Dmsg1(100, "=== End msg_thread. use=%d\n", jcr->use_count()); + Dmsg2(100, "=== End msg_thread. JobId=%d usecnt=%d\n", jcr->JobId, jcr->use_count()); free_jcr(jcr); /* release jcr */ db_thread_cleanup(); /* remove thread specific data */ } diff --git a/bacula/src/dird/next_vol.c b/bacula/src/dird/next_vol.c index a675a07374..904f4cf0ca 100644 --- a/bacula/src/dird/next_vol.c +++ b/bacula/src/dird/next_vol.c @@ -42,6 +42,7 @@ /* * Items needed: * mr.PoolId must be set + * mr.StorageId should also be set * jcr->wstore * jcr->db * jcr->pool @@ -134,10 +135,10 @@ int find_next_volume_for_append(JCR *jcr, MEDIA_DBR *mr, int index, jcr->pool->purge_oldest_volume, jcr->pool->recycle_oldest_volume); /* Find oldest volume to recycle */ ok = db_find_next_volume(jcr, jcr->db, -1, InChanger, mr); - Dmsg1(400, "Find oldest=%d\n", ok); + Dmsg1(200, "Find oldest=%d Volume\n", ok); if (ok && prune) { UAContext *ua; - Dmsg0(400, "Try purge.\n"); + Dmsg0(200, "Try purge Volume.\n"); /* * 7. Try to purging oldest volume only if not UA calling us. */