Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry download not working #45

Open
gabrielefronze opened this issue Oct 16, 2020 · 0 comments
Open

Retry download not working #45

gabrielefronze opened this issue Oct 16, 2020 · 0 comments

Comments

@gabrielefronze
Copy link
Collaborator

Apparently there's an error within the code wrapping rucio download, which was previously commented to avoid issues.
If a download fails it should be retried by the pipeline:

if(output->freturn_code != MAX_ATTEMPTS){
fastlog(INFO,"Trying again did %s download in %s.", output->fdid.data(), output->full_cache_path().data());
// fInputQ->append(*output);

The idea is nice, but the issue is with the if condition. In fact testing:

output->freturn_code != MAX_ATTEMPTS

should be:

output->freturn_code != TOO_MANY_ATTEMPTS

or:

output->fattempt > MAX_ATTEMPTS

based on the definition here:

rucio_download_info* rucio_download_wrapper(rucio_download_info& info){
if(not server_exists(info.fserver_name)) {
fastlog(ERROR, "Server %s not found. Aborting!", info.fserver_name.data());
info.freturn_code = SERVER_NOT_FOUND;
return &info;
} else {
if (info.fattempt <= MAX_ATTEMPTS and info.freturn_code != SETTINGS_NOT_FOUND) {
info.fattempt++;
info.freturn_code = rucio_download_wrapper(info.fserver_name, info.fserver_config, info.scopename(),
info.filename());
info.fdownloaded = (info.freturn_code != FILE_NOT_FOUND and info.freturn_code != SETTINGS_NOT_FOUND);
} else {
info.freturn_code = TOO_MANY_ATTEMPTS;
info.fdownloaded = false;
}
}
return &info;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant