-
Notifications
You must be signed in to change notification settings - Fork 591
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
feat(connector): structural logging for parsing error #12659
Conversation
Signed-off-by: Bugen Zhao <[email protected]>
Signed-off-by: Bugen Zhao <[email protected]>
Signed-off-by: Bugen Zhao <[email protected]>
Signed-off-by: Bugen Zhao <[email protected]>
Signed-off-by: Bugen Zhao <[email protected]>
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.
Generally LGTM!
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.
As a result, we may instruct users to filter the logs with the target
risingwave_connector::parser
andsource_ids
to inspect the messages that are failed to parse.
I am wondering that is it possible to filter out all user-facing errors with some Loki query? Or shall we just consider all errors as user-facing errors? (The later one seems not bad 🤔)
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.
Or shall we just consider all errors as user-facing errors?
I think so. 👍
Signed-off-by: Bugen Zhao <[email protected]>
Signed-off-by: Bugen Zhao <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #12659 +/- ##
==========================================
- Coverage 69.40% 69.33% -0.08%
==========================================
Files 1470 1470
Lines 241531 241474 -57
==========================================
- Hits 167637 167426 -211
- Misses 73894 74048 +154
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 23 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Signed-off-by: Bugen Zhao <[email protected]>
Co-authored-by: Bugen Zhao <[email protected]>
Signed-off-by: Bugen Zhao [email protected]I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
See #12366 for the background.
The error-handling path in the connector parser is kind of complicated, and users often complain about the confusion of the behavior when parsing a message fails. We've had some attempts before (like #10454). In this PR, we further unify the error handling strategy and code path, then provide tracing observability on that.
Specifically,
SourceStreamChunkRowWriter
. Based on a similar idea to refactor(connector): removeWriteGuard
andfulfill_meta_column
from parser #12542, we can also unify the error handling to thedo_action
method. This means that parser implementors don't have to care about error handling anymore.Take the logs for plain JSON parser as an example:
json::Value
before any calling toWriter::{insert|delete|update}
. Therefore, the error will be thrown and lead to the whole message being skipped.Writer
.As a result, we may instruct users to filter the logs with the target
risingwave_connector::parser
andsource_id
s to inspect the messages that are failed to parse.Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.