Skip to content

Commit

Permalink
Merge pull request #1131
Browse files Browse the repository at this point in the history
fix director crash when there are no jobs to consolidate
  • Loading branch information
arogge committed Mar 17, 2022
2 parents c9b3558 + d173e71 commit 9c4a806
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ and since Bareos version 20 this project adheres to [Semantic Versioning](https:
- Don't keep volume open after acquiring a read-storage failed in migrate/copy/virtual full [PR #1106]
- webui: show DIR message if ACL prevents a job rerun [PR #1110]
- webui: fix restore file tree rendering [PR #1127]
- dir: fix crash when there are no jobs to consolidate [PR #1131]

### Changed
- webui: remove an unnecessary .bvfs_get_jobids and buildSubtree() call [PR #1050]
Expand Down Expand Up @@ -101,10 +102,14 @@ and since Bareos version 20 this project adheres to [Semantic Versioning](https:
[PR #1088]: https://github.com/bareos/bareos/pull/1088
[PR #1089]: https://github.com/bareos/bareos/pull/1089
[PR #1092]: https://github.com/bareos/bareos/pull/1092
[PR #1093]: https://github.com/bareos/bareos/pull/1093
[PR #1097]: https://github.com/bareos/bareos/pull/1097
[PR #1098]: https://github.com/bareos/bareos/pull/1098
[PR #1106]: https://github.com/bareos/bareos/pull/1106
[PR #1110]: https://github.com/bareos/bareos/pull/1110
[PR #1115]: https://github.com/bareos/bareos/pull/1115
[PR #1093]: https://github.com/bareos/bareos/pull/1093
[PR #1120]: https://github.com/bareos/bareos/pull/1120
[PR #1122]: https://github.com/bareos/bareos/pull/1122
[PR #1127]: https://github.com/bareos/bareos/pull/1127
[PR #1131]: https://github.com/bareos/bareos/pull/1131
[unreleased]: https://github.com/bareos/bareos/tree/master
2 changes: 2 additions & 0 deletions core/src/cats/sql_get.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1299,6 +1299,8 @@ bool BareosDb::GetUsedBaseJobids(JobControlRecord* jcr,
*/
db_list_ctx BareosDb::FilterZeroFileJobs(db_list_ctx& jobids)
{
if (jobids.empty()) { return {}; }

std::string query{"SELECT JobId FROM Job WHERE JobFiles = 0 AND JobId IN ("};
query += jobids.Join(",") + ")";

Expand Down

0 comments on commit 9c4a806

Please sign in to comment.