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

File Status not updating when sending multiple files #76

Open
amanrique1 opened this issue Jun 12, 2023 · 3 comments
Open

File Status not updating when sending multiple files #76

amanrique1 opened this issue Jun 12, 2023 · 3 comments

Comments

@amanrique1
Copy link

amanrique1 commented Jun 12, 2023

I am using the DBSApi from the python client but I see no change on DAS when sending a list of files as logical_file_name parameter. If I call the same function but with an individual file instead of a list it works fine.

from dbs.apis.dbsClient import DbsApi

TEST_url="https://cmsweb-testbed.cern.ch/dbs2go-writer"
PROD_url="https://cmsweb.cern.ch/dbs/prod/global/DBSWriter"

dbsApi = DbsApi(url=PROD_url)

files = ['/store/data/Run2023C/AlCaLumiPixelsCountsPrompt/ALCARECO/AlCaPCCRandom-PromptReco-v2/000/367/622/00000/cdebecd9-01b0-4650-88f3-47da0088d3b3.root','/store/data/Run2023C/AlCaLumiPixelsCountsPrompt/ALCARECO/AlCaPCCZeroBias-PromptReco-v2/000/367/622/00000/e456c767-925a-4fb6-8ecc-82a08b294c51.root']
result = dbsApi.updateFileStatus(logical_file_name=files, is_file_valid=0, lost=0)
@vkuznet
Copy link
Contributor

vkuznet commented Jun 15, 2023

@amanrique1, we need more info about this issue. So far, you provided client side code, but does not specify its output. The DAS has nothing to do with DBS as it only queries DBS. Therefore, we need the following:

  • please run your code and provide its output
  • you should verify the validity of files via DBS APIs, e.g.
curl https://cmsweb.cern.ch/dbs/prod/global/DBSReader/files?logical_file_name=...&detail=True

For DBS APIs please refer to this page. The DAS will do the same, therefore we only need to check DBS content.

  • Finally, I do not see any issue with slightly restructuring this code to add for loop and perform update of individual files.

@d-ylee , this is something you should look at and help to resolve this user issue.

@amanrique1
Copy link
Author

Hi @vkuznet
When running for multiple files, I'm getting [] as the response (the same as running for one file at the time). I tried sending only one file on the list, but I got the same result. It seems to be a problem when sending the files into a list and not individually as a string. Because checking with the API I see that in this list cases, the validity is not being updated.
Regarding sending them in a loop, this week I had o invalidate more than 300k files, and took me hours to do it like that, so sending multiple files by batches could be helpful

@vkuznet
Copy link
Contributor

vkuznet commented Jun 15, 2023

ok, we still need more info, what is a batch size did you use? Did you tried a different batch size?

@d-ylee d-ylee removed their assignment Sep 19, 2024
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

3 participants