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

Fix performance regression in group::dump() #5002

Merged
merged 2 commits into from
May 27, 2024

Conversation

ypatia
Copy link
Member

@ypatia ypatia commented May 23, 2024

This fix to 38499 , introduced a performance regression to Group::dump , since now the method calls object_type for every member in a for loop while the type is already known and every such call initiates two extra checks (one for is_array and one for is_group).

The fix in this PR is to let group open fail when the group is not there instead, check on the return value and log that the array doesn't exist.


TYPE: BUG
DESC: Fix performance regression in group::dump()

Copy link
Member

@teo-tsirpanis teo-tsirpanis left a comment

Choose a reason for hiding this comment

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

Thanks!

@ypatia
Copy link
Member Author

ypatia commented May 24, 2024

I removed the test I ported to [rest-ci] because it fails for an unrelated reason. Opened [sc-48099] to track

@ypatia ypatia force-pushed the yt/sc-48006/fix_group_dump_remote_issue branch from fe5e2fe to 43778d0 Compare May 24, 2024 13:11
@ypatia ypatia merged commit 0098fd3 into dev May 27, 2024
60 checks passed
@ypatia ypatia deleted the yt/sc-48006/fix_group_dump_remote_issue branch May 27, 2024 09:53
KiterLuc added a commit that referenced this pull request May 27, 2024
After merging #5002 and #4999, dump for non existing group recursive group stopped working. This is because the error logic in 5002 expected a status code whilst 4999 changes to throw an exception. The fix changes the group code to throw a known exception which is caught at the upper level as a group not found exception. This is much cleaner that using a failed status code, which could mean many other issues.

---
TYPE: NO_HISTORY
DESC: Fix group not found issue.
KiterLuc added a commit that referenced this pull request May 27, 2024
After merging #5002 and
#4999, dump for non existing
group recursive group stopped working. This is because the error logic
in 5002 expected a status code whilst 4999 changes to throw an
exception. The fix changes the group code to throw a known exception
which is caught at the upper level as a group not found exception. This
is much cleaner that using a failed status code, which could mean many
other issues.

Also, taking advantage to unstatus group.cc/h.

---
TYPE: NO_HISTORY
DESC: Fix group not found issue.
@Shelnutt2 Shelnutt2 changed the title Fix performance regression in group::dump() for tiledb:// arrays Fix performance regression in group::dump() May 28, 2024
@Shelnutt2
Copy link
Member

@ypatia this issue effects all backends. It's not specific in anyway to tiledb URIs. Refetching the type when we already have it as a means if checking if a URI exist is universally am issue and logically incorrect.

@ypatia
Copy link
Member Author

ypatia commented May 28, 2024

@ypatia this issue effects all backends. It's not specific in anyway to tiledb URIs. Refetching the type when we already have it as a means if checking if a URI exist is universally am issue and logically incorrect.

You are right, I will adapt the PR and shortcut descriptions. The fix is however covering all the cases, so we are good. Please correct me if I am wrong and still missing something.

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.

4 participants