From: Kern Sibbald Date: Sat, 6 Oct 2007 10:43:49 +0000 (+0000) Subject: Correct technotes bug # X-Git-Tag: Release-3.0.0~2389 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=efda8427f8f2b00a78beec57aca2bf62be1e793a;p=bacula%2Fbacula Correct technotes bug # git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5733 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/cats/sql_create.c b/bacula/src/cats/sql_create.c index 8ea820b36a..8ffba95043 100644 --- a/bacula/src/cats/sql_create.c +++ b/bacula/src/cats/sql_create.c @@ -754,22 +754,28 @@ bool my_batch_end(JCR *jcr, B_DB *mdb, const char *error) */ bool db_write_batch_file_records(JCR *jcr) { + int JobStatus = jcr->JobStatus; + if (!jcr->db_batch) { /* no files to backup ? */ Dmsg0(50,"db_create_file_record : no files\n"); return true; } + if (job_canceled(jcr)) { + return false; + } Dmsg1(50,"db_create_file_record changes=%u\n",jcr->db_batch->changes); + jcr->JobStatus = JS_AttrInserting; if (!sql_batch_end(jcr, jcr->db_batch, NULL)) { Jmsg(jcr, M_FATAL, 0, "Bad batch end %s\n", jcr->db_batch->errmsg); return false; } - if (job_canceled(jcr)) { return false; } + /* we have to lock tables */ if (!db_sql_query(jcr->db_batch, sql_batch_lock_path_query, NULL, NULL)) { Jmsg(jcr, M_FATAL, 0, "Can't lock Path table %s\n", jcr->db_batch->errmsg); @@ -819,6 +825,7 @@ bool db_write_batch_file_records(JCR *jcr) db_sql_query(jcr->db_batch, "DROP TABLE batch", NULL,NULL); + jcr->JobStatus = JobStatus; /* reset entry status */ return true; } diff --git a/bacula/src/jcr.h b/bacula/src/jcr.h index ad28b3485c..8812594861 100644 --- a/bacula/src/jcr.h +++ b/bacula/src/jcr.h @@ -87,6 +87,8 @@ #define JS_WaitMaxJobs 'd' /* Waiting for maximum jobs */ #define JS_WaitStartTime 't' /* Waiting for start time */ #define JS_WaitPriority 'p' /* Waiting for higher priority jobs to finish */ +#define JS_AttrDespooling 'a' /* SD despooling attributes */ +#define JS_AttrInserting 'i' /* Doing batch insert file records */ /* Migration selection types */ enum { diff --git a/bacula/src/lib/util.c b/bacula/src/lib/util.c index 50844211eb..f1560a8cc9 100644 --- a/bacula/src/lib/util.c +++ b/bacula/src/lib/util.c @@ -230,6 +230,12 @@ void jobstatus_to_ascii(int JobStatus, char *msg, int maxlen) case JS_WaitPriority: jobstat = _("Waiting on Priority"); break; + case JS_AttrDespooling: + jobstat = _("SD despooling Attributes"); + break; + case JS_AttrInserting: + jobstat = _("Dir inserting Attributes"); + break; default: if (JobStatus == 0) { diff --git a/bacula/src/stored/askdir.c b/bacula/src/stored/askdir.c index 1141df69c4..40bde43760 100644 --- a/bacula/src/stored/askdir.c +++ b/bacula/src/stored/askdir.c @@ -148,7 +148,7 @@ bool dir_update_changer(JCR *jcr, AUTOCHANGER *changer) */ bool dir_send_job_status(JCR *jcr) { - return bnet_fsend(jcr->dir_bsock, Job_status, jcr->Job, jcr->JobStatus); + return jcr->dir_bsock->fsend(Job_status, jcr->Job, jcr->JobStatus); } /* diff --git a/bacula/src/stored/spool.c b/bacula/src/stored/spool.c index e86672efb2..25eb7c12d5 100644 --- a/bacula/src/stored/spool.c +++ b/bacula/src/stored/spool.c @@ -631,6 +631,8 @@ bool commit_attribute_spool(JCR *jcr) } spool_stats.attr_size += size; V(mutex); + set_jcr_job_status(jcr, JS_AttrDespooling); + dir_send_job_status(jcr); Jmsg(jcr, M_INFO, 0, _("Sending spooled attrs to the Director. Despooling %s bytes ...\n"), edit_uint64_with_commas(size, ec1)); jcr->dir_bsock->despool(update_attr_spool_size, size); diff --git a/bacula/technotes-2.3 b/bacula/technotes-2.3 index d8a943c0e2..08ffd6b04f 100644 --- a/bacula/technotes-2.3 +++ b/bacula/technotes-2.3 @@ -1,7 +1,10 @@ Technical notes on version 2.3 General: +06Oct07 +kes Fix Win32 drive display in bat version browser. Fixes bug #962. 05Oct07 +kes Fix doc issue. This fixes bug #963. kes Fix listing performance problems in bat. Pointed out by Chris Howells. kes Remove old debug code.