-
Notifications
You must be signed in to change notification settings - Fork 307
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
Core & Internals: simplify list_replica response creation. Closes #4473 #4691
Core & Internals: simplify list_replica response creation. Closes #4473 #4691
Conversation
|
||
# don't forget to resolve parents for the last replica | ||
if resolve_parents: | ||
file['pfns'], file['rses'], file['states'] = {}, defaultdict(list), {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the file['states']
was previously file['states'] = {rse_id: str(state.name if state else state)}
, now it's just {}
on purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is done a couple of lines below.
|
||
# don't forget to resolve parents for the last replica | ||
if resolve_parents: | ||
file['pfns'], file['rses'], file['states'] = {}, defaultdict(list), {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is done a couple of lines below.
|
||
if rse_id: | ||
file['rses'][rse_id] += list(set([tmp_pfn[0] for tmp_pfn in pfns])) | ||
file['states'][rse_id] = str(state.name if state else state) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here
…io#4473 Extract pfn/rse sorting to a separate function and call it in the 2 needed places (each time before yielding the file). Only resolve parents once per scope/name. As a side note, parents are not resolved for archives, but this never worked I don't see any regression about it in rucio#4473.
62e2560
to
7a00e4f
Compare
Extract pfn/rse sorting to a separate function and call it in the 2
needed places (each time before yielding the file).
Only resolve parents once per scope/name. As a side note, parents
are not resolved for archives, but this never worked. I don't see
any regression about it in #4473.