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

Add requested sizes to memory exceptions and logs. #5346

Merged
merged 5 commits into from
Oct 15, 2024

Conversation

shaunrd0
Copy link
Contributor

This adds some more context to exceptions and logging when hitting cases where we have exceeded memory budgets.


TYPE: NO_HISTORY
DESC: Add requested sizes to memory exceptions and logs.

@shaunrd0 shaunrd0 requested a review from ypatia October 10, 2024 20:41
Copy link
Member

@ypatia ypatia left a comment

Choose a reason for hiding this comment

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

Thanks for the changes! We also need to adapt the error message to match the format we expect in the case we cannot load tile offsets for sparse readers too:

@@ -346,26 +346,83 @@ SparseGlobalOrderReader<BitmapType>::create_result_tiles(
// Get the number of fragments to process and compute per fragment memory.
uint64_t num_fragments_to_process =
tmp_read_state_.num_fragments_to_process();
per_fragment_memory_ = memory_budget_.total_budget() *
memory_budget_.ratio_coords() /
num_fragments_to_process;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It looks like there was division by 0 happening here for the cases where num_fragments_to_process was found to be 0. The exception only came up after I introduced the coordinates_budget() method, but on rerunning the failing test I could see that we divide by zero without this method as well.

image

@shaunrd0 shaunrd0 merged commit 39c665a into dev Oct 15, 2024
63 checks passed
@shaunrd0 shaunrd0 deleted the smr/sc-57280/verbose-memory-exceptions branch October 15, 2024 14:17
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.

2 participants