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 log entry in WsAndHttpChannelizerHandler #2855

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

dh-cloud
Copy link
Contributor

@dh-cloud dh-cloud commented Oct 28, 2024

The log entry here is necessary because when an exception thrown by
Netty reaches exceptionCaught(), if the error is not printed, the
server side will not be able to know what has happened.

For example, if the maxContentLength in JanusGraph's Gremlin-Server
configuration is set to 65536, and the client sends data over this
size via WebSocket, the JanusGraph server logs will appear normal,
but the client will experience a disconnection, making it difficult
to immediately identify the cause of the issue.

@kenhuuu
Copy link
Contributor

kenhuuu commented Oct 28, 2024

Hi and thanks for contributing.

You are currently targeting this PR to master but it should most likely be targeting 3.7-dev. That's because WebSockets won't be supported in the next major version so the file you are changing won't exist soon in master.

Also, do you mind putting a small entry into the CHANGELOG.

@dh-cloud dh-cloud changed the base branch from master to 3.7-dev October 29, 2024 01:38
@dh-cloud dh-cloud changed the title The log printing here is necessary because when an exception thrown b… Add log entry in WsAndHttpChannelizerHandler Oct 29, 2024
// For example, if the maxContentLength in JanusGraph's Gremlin-Server configuration is set to 65536,
// and the client sends data over this size via WebSocket, the JanusGraph server logs will appear normal,
// but the client will experience a disconnection, making it difficult to immediately identify the cause of the issue.
logger.error("Error processing request from netty", cause);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
logger.error("Error processing request from netty", cause);
logger.error("Could not process the request", cause);

Nit: the error should be slightly more generic to match what is done in gremlin-driver

@kenhuuu
Copy link
Contributor

kenhuuu commented Oct 29, 2024

Thanks, I just have one small nit regarding the logged message.

VOTE +1, pending change.

@xiazcy
Copy link
Contributor

xiazcy commented Oct 30, 2024

VOTE +1

@codecov-commenter
Copy link

codecov-commenter commented Oct 30, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 76.43%. Comparing base (9b46b67) to head (8747760).
Report is 269 commits behind head on 3.7-dev.

Files with missing lines Patch % Lines
...in/server/handler/WsAndHttpChannelizerHandler.java 50.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             3.7-dev    #2855      +/-   ##
=============================================
+ Coverage      76.14%   76.43%   +0.28%     
- Complexity     13152    13226      +74     
=============================================
  Files           1084     1060      -24     
  Lines          65160    61489    -3671     
  Branches        7285     7334      +49     
=============================================
- Hits           49616    46999    -2617     
+ Misses         12839    11975     -864     
+ Partials        2705     2515     -190     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

The log entry here is necessary because when an exception thrown by
Netty reaches exceptionCaught(), if the error is not printed, the
server side will not be able to know what has happened.

For example, if the maxContentLength in JanusGraph's Gremlin-Server
configuration is set to 65536, and the client sends data over this
size via WebSocket, the JanusGraph server logs will appear normal,
but the client will experience a disconnection, making it difficult
to immediately identify the cause of the issue.
@Cole-Greer
Copy link
Contributor

VOTE +1

@Cole-Greer Cole-Greer merged commit c3064a7 into apache:3.7-dev Nov 1, 2024
24 checks passed
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.

5 participants