From: Kern Sibbald Date: Mon, 30 May 2011 10:03:07 +0000 (+0200) Subject: Remove broken code X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=94b258600fb9f4fccff5c97b554e3f7262071895;p=bacula%2Fbacula Remove broken code --- diff --git a/bacula/src/dird/backup.c b/bacula/src/dird/backup.c index f5a1fe4f61..4ac0b8af5f 100644 --- a/bacula/src/dird/backup.c +++ b/bacula/src/dird/backup.c @@ -246,7 +246,7 @@ bool send_accurate_current_files(JCR *jcr) if (jcr->is_canceled() || jcr->is_JobLevel(L_BASE)) { return true; } - if (!jcr->accurate && !jcr->rerunning) { + if (!jcr->accurate) { return true; } @@ -255,7 +255,7 @@ bool send_accurate_current_files(JCR *jcr) if (get_base_jobids(jcr, &jobids)) { jcr->HasBase = true; Jmsg(jcr, M_INFO, 0, _("Using BaseJobId(s): %s\n"), jobids.list); - } else if (!jcr->rerunning) { + } else { return true; } } else { @@ -269,12 +269,6 @@ bool send_accurate_current_files(JCR *jcr) } } - /* For incomplete Jobs, we add our own id */ - if (jcr->rerunning) { - edit_int64(jcr->JobId, ed1); - jobids.add(ed1); - } - /* Don't send and store the checksum if fileset doesn't require it */ jcr->use_accurate_chksum = is_checksum_needed_by_fileset(jcr); @@ -332,13 +326,8 @@ bool do_backup(JCR *jcr) } /* Print Job Start message */ - if (jcr->rerunning) { - Jmsg(jcr, M_INFO, 0, _("Restart Incomplete Backup JobId %s, Job=%s\n"), - edit_uint64(jcr->JobId, ed1), jcr->Job); - } else { - Jmsg(jcr, M_INFO, 0, _("Start Backup JobId %s, Job=%s\n"), - edit_uint64(jcr->JobId, ed1), jcr->Job); - } + Jmsg(jcr, M_INFO, 0, _("Start Backup JobId %s, Job=%s\n"), + edit_uint64(jcr->JobId, ed1), jcr->Job); jcr->setJobStatus(JS_Running); Dmsg2(100, "JobId=%d JobLevel=%c\n", jcr->jr.JobId, jcr->jr.JobLevel); @@ -347,35 +336,6 @@ bool do_backup(JCR *jcr) return false; } - /* For incomplete Jobs, we add our own id */ - if (jcr->rerunning) { - edit_int64(jcr->JobId, ed1); - Mmsg(buf, "SELECT max(FileIndex) FROM File WHERE JobId=%s", ed1); - if (db_sql_query(jcr->db, buf.c_str(), db_int64_handler, &job)) { - Jmsg(jcr, M_INFO, 0, _("Found %ld files from prior incomplete Job.\n"), - (int32_t)job.value); - } else { - Jmsg(jcr, M_FATAL, 0, "%s", db_strerror(jcr->db)); - return false; - } - jcr->JobFiles = job.value; - Dmsg1(100, "==== FI=%ld\n", jcr->JobFiles); - Mmsg(buf, "SELECT VolSessionId FROM Job WHERE JobId=%s", ed1); - if (!db_sql_query(jcr->db, buf.c_str(), db_int64_handler, &job)) { - Jmsg(jcr, M_FATAL, 0, "%s", db_strerror(jcr->db)); - return false; - } - jcr->VolSessionId = job.value; - Mmsg(buf, "SELECT VolSessionTime FROM Job WHERE JobId=%s", ed1); - if (!db_sql_query(jcr->db, buf.c_str(), db_int64_handler, &job)) { - Jmsg(jcr, M_FATAL, 0, "%s", db_strerror(jcr->db)); - return false; - } - jcr->VolSessionTime = job.value; - Dmsg4(100, "JobId=%s JobFiles=%ld VolSessionId=%ld VolSessionTime=%ld\n", ed1, - jcr->JobFiles, jcr->VolSessionId, jcr->VolSessionTime); - } - /* * Open a message channel connection with the Storage * daemon. This is to let him know that our client diff --git a/bacula/src/dird/dird_conf.c b/bacula/src/dird/dird_conf.c index d3e49511e2..a8bb3dfb37 100644 --- a/bacula/src/dird/dird_conf.c +++ b/bacula/src/dird/dird_conf.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2000-2010 Free Software Foundation Europe e.V. + Copyright (C) 2000-2011 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -326,7 +326,6 @@ RES_ITEM job_items[] = { {"clientrunafterjob", store_short_runscript, ITEM(res_job.RunScripts), 0, 0, 0}, {"maximumconcurrentjobs", store_pint32, ITEM(res_job.MaxConcurrentJobs), 0, ITEM_DEFAULT, 1}, {"rescheduleonerror", store_bool, ITEM(res_job.RescheduleOnError), 0, ITEM_DEFAULT, false}, - {"rescheduleincompletejobs", store_bool, ITEM(res_job.RescheduleIncompleteJobs), 0, ITEM_DEFAULT, true}, {"rescheduleinterval", store_time, ITEM(res_job.RescheduleInterval), 0, ITEM_DEFAULT, 60 * 30}, {"rescheduletimes", store_pint32, ITEM(res_job.RescheduleTimes), 0, 0, 5}, {"priority", store_pint32, ITEM(res_job.Priority), 0, ITEM_DEFAULT, 10}, diff --git a/bacula/src/dird/jobq.c b/bacula/src/dird/jobq.c index 026b0f84e9..10a4ccdc9c 100644 --- a/bacula/src/dird/jobq.c +++ b/bacula/src/dird/jobq.c @@ -637,7 +637,6 @@ static bool reschedule_job(JCR *jcr, jobq_t *jq, jobq_item_t *je) * Reschedule this job by cleaning it up, but * reuse the same JobId if possible. */ - jcr->rerunning = jcr->is_incomplete(); /* save incomplete status */ time_t now = time(NULL); jcr->reschedule_count++; jcr->sched_time = now + jcr->job->RescheduleInterval; @@ -656,7 +655,7 @@ static bool reschedule_job(JCR *jcr, jobq_t *jq, jobq_item_t *je) return false; } /* Only jobs with no output or Incomplete jobs can run on same JCR */ - if (jcr->JobBytes == 0 || jcr->rerunning) { + if (jcr->JobBytes == 0) { Dmsg2(2300, "Requeue job=%d use=%d\n", jcr->JobId, jcr->use_count()); V(jq->mutex); /*