-
Notifications
You must be signed in to change notification settings - Fork 615
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
refactor(error): reduce error type size #11275
Conversation
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
I'm considering whether the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥🥵
- merge StreamExecutorError and StreamError: not sure. What’s the reason? I generally prefer more fine-grained error types, if no much trouble introduced, because it made clear what’s possible errors for a function.
- XxError -> Error. Not sure. Personally slightly prefer the former, but no strong opinions.
Others lgtm
I found the main body of stream crate is the executors. Having two error types cause double memory usage in most cases. And I prefer one unified error type in one crate.
In most 3rd party libraries and std library, their error types are named |
Personally, I prefer to keep the granularity as fine as possible. 😰 Currently the difference between Similar ideas are applied to expression as well. -> #10764 |
e713c14
to
810dead
Compare
I'd prefer split Error instead of merge Error. |
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
810dead
to
a434571
Compare
Error
Reverted merging and renaming. PTAL again. 🤡 |
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
ccf3833
to
d13aad4
Compare
Codecov Report
@@ Coverage Diff @@
## main #11275 +/- ##
==========================================
- Coverage 69.79% 69.78% -0.01%
==========================================
Files 1359 1360 +1
Lines 225851 225880 +29
==========================================
+ Hits 157630 157635 +5
- Misses 68221 68245 +24
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest LGTM
Signed-off-by: Runji Wang <wangrunji0408@163.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Really appreciate.
Nice! Looking forward to seeing the performance! |
Signed-off-by: Runji Wang <wangrunji0408@163.com>
375565f
to
f4d371e
Compare
Signed-off-by: Runji Wang <wangrunji0408@163.com>
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
This PR reduces size of the following error types:
by boxing the error body and offloading them to the heap.
The common pattern of this technique is:
This partially resolves #11263.
Checklist
./risedev check
(or alias,./risedev c
)Documentation