Box FlightErrror::tonic to reduce size (fixes nightly clippy)#7229
Merged
crepererum merged 4 commits intoapache:mainfrom Mar 7, 2025
Merged
Box FlightErrror::tonic to reduce size (fixes nightly clippy)#7229crepererum merged 4 commits intoapache:mainfrom
FlightErrror::tonic to reduce size (fixes nightly clippy)#7229crepererum merged 4 commits intoapache:mainfrom
Conversation
lewiszlw
approved these changes
Mar 6, 2025
Contributor
can you add a test that checks that, e.g. #[test]
fn test_error_size() {
assert_eq!(std::mem::size_of::<FlightError>(), 32);
} |
Contributor
I took the liberty of adding this in 94da215 and pushed to this branch |
FlightErrror::tonic to reduce size (fixes nightly clippy)
alamb
approved these changes
Mar 6, 2025
Contributor
alamb
left a comment
There was a problem hiding this comment.
Thank you @XiangpengHao @crepererum and @lewiszlw
crepererum
approved these changes
Mar 7, 2025
Contributor
|
I think this has been merged by mistake? Is main open for breaking changes yet? |
Contributor
I forgot that, TBH I find it tiring to manually check the release schedule every time. Edit: filed #7268 to prevent future annoyance. |
This was referenced Mar 11, 2025
alamb
added a commit
to alamb/arrow-rs
that referenced
this pull request
Mar 12, 2025
…py) (apache#7229)" (apache#7266) This reverts commit f4fde76.
Contributor
|
Update:
|
alamb
added a commit
that referenced
this pull request
Mar 24, 2025
wiedld
pushed a commit
to influxdata/arrow-rs
that referenced
this pull request
May 21, 2025
…py) (apache#7229)" (apache#7266) (apache#7277) This reverts commit f4fde76.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #.
Rationale for this change
When working on the nightly rust, I noticed that clippy warns about
FlightErrortoo large, more than 176 bytes.I think it makes sense to keep the error small (32 bytes), as the Result<...> is used in a lot of places.
This PR basically makes
Tonic(tonic::Status)intoTonic(Box<tonic::Status>), which reduces the FlightError from 176 bytes down to 32 bytes.This adds an extra allocation on error, but should probably be fine as it's not on hot path.
What changes are included in this PR?
Are there any user-facing changes?