Skip to content

fix: Only dispatch requests to Source if we actually will use them #1436

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

Merged
merged 1 commit into from
May 15, 2025

Conversation

nsmith-
Copy link
Member

@nsmith- nsmith- commented May 14, 2025

The notifications queue in _ranges_or_baskets_to_arrays cannot be aware of chunk requests in flight because the queue only gets pushed to when we receive the returned chunk data. If we have the necessary array in cache, then we exit this function and fire-and-forget chunk requests causing extra network traffic, and more to the point, potential race conditions between receiving chunks and closing the file on teardown.

Fixes scikit-hep/coffea#1331

The notifications queue in _ranges_or_baskets_to_arrays cannot be aware
of chunk requests in flight because the queue only receives the returned
chunks. If we have the necessary array in cache, then we exit this
function and fire-and-forget chunk requests causing extra network
traffic, and more to the point, potential race conditions between
receiving chunks and closing the file on teardown.

Fixes scikit-hep/coffea#1331
@ikrommyd
Copy link
Contributor

@ianna this is critical even for iris-hep training.

Copy link
Collaborator

@ianna ianna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nsmith- Looks great! Thanks!

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

Successfully merging this pull request may close these issues.

Reading chunks with nanoevents in a loop over xrootd + BaseSchema + performing some operation leads to xrootd [ERROR] Invalid operation
3 participants