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

Check for duplicate in splitter #2213

Merged
merged 2 commits into from
Nov 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions ganga/GangaDirac/Lib/Splitters/OfflineGangaDiracSplitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,15 @@ def OfflineGangaDiracSplitter(_inputs, filesPerJob, maxFiles, ignoremissing, ban
check_count = check_count + len(i)

if check_count != len(inputs) - len(bad_lfns):
#First check if there are duplicates causing this problem
allLFNs = [_lfn.lfn for _lfn in inputs]
lfnset = set(allLFNs)
del_list = list(allLFNs)
for _l in lfnset:
del_list.remove(_l)
if len(del_list)>0:
raise SplitterError("Duplicate LFNs found, check your inputdata! %s" % del_list)

logger.error("SERIOUS SPLITTING ERROR!!!!!")
logger.warning("%s != %s - %s" % (check_count, len(inputs), len(bad_lfns)))
logger.warning("inputs:\n%s" % str(inputs))
Expand Down