{"allowcompression", store_bool, ITEM(res_store.AllowCompress), 0, ITEM_DEFAULT, true},
{"heartbeatinterval", store_time, ITEM(res_store.heartbeat_interval), 0, ITEM_DEFAULT, 0},
{"maximumconcurrentjobs", store_pint32, ITEM(res_store.MaxConcurrentJobs), 0, ITEM_DEFAULT, 1},
+ {"maximumconcurrentreadjobs", store_pint32, ITEM(res_store.MaxConcurrentReadJobs), 0, ITEM_DEFAULT, 0},
{"sddport", store_pint32, ITEM(res_store.SDDport), 0, 0, 0}, /* deprecated */
{"tlsauthenticate", store_bool, ITEM(res_store.tls_authenticate), 0, 0, 0},
{"tlsenable", store_bool, ITEM(res_store.tls_enable), 0, 0, 0},
char *media_type;
alist *device; /* Alternate devices for this Storage */
int32_t MaxConcurrentJobs; /* Maximum concurrent jobs */
+ int32_t MaxConcurrentReadJobs; /* Maximum concurrent jobs reading */
int32_t NumConcurrentJobs; /* number of concurrent jobs running */
int32_t NumConcurrentReadJobs; /* number of jobs reading */
char *tls_ca_certfile; /* TLS CA Certificate File */
bool inc_read_store(JCR *jcr)
{
P(rstore_mutex);
- if (jcr->rstore->NumConcurrentJobs < jcr->rstore->MaxConcurrentJobs) {
+ if (jcr->rstore->NumConcurrentJobs < jcr->rstore->MaxConcurrentJobs &&
+ (jcr->getJobType() == JT_RESTORE ||
+ jcr->rstore->MaxConcurrentReadJobs == 0 ||
+ jcr->rstore->NumConcurrentReadJobs < jcr->rstore->MaxConcurrentReadJobs)) {
jcr->rstore->NumConcurrentReadJobs++;
jcr->rstore->NumConcurrentJobs++;
Dmsg1(200, "Inc rncj=%d\n", jcr->rstore->NumConcurrentJobs);