Skip to content

fix(session): avoid complete rpc without response#744

Merged
merlimat merged 3 commits intomainfrom
avoid_close_without_response
Aug 28, 2025
Merged

fix(session): avoid complete rpc without response#744
merlimat merged 3 commits intomainfrom
avoid_close_without_response

Conversation

@mattisonchao
Copy link
Copy Markdown
Member

@mattisonchao mattisonchao commented Aug 28, 2025

Motivation

fixes: #745

The current logic will return nil,nil to the client when the session is not found. which is confusing the client side because we didn't give the correct response body, but an OK status.

}

s.log.Warn("Session not found, it should already closed")
return nil, err
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is going to propagate the SessionNotFound back to client, right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, I was considering hiding it. But on the server-side, we should give a clear error to the client and then let the client decide what they should do. :)

Copy link
Copy Markdown
Member Author

@mattisonchao mattisonchao Aug 28, 2025

Choose a reason for hiding this comment

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

Plus, we propagated the error to the client at the beginning of the system.

#609 changed the behaviour. (I accept we don't print the warn log on the server, but we shouldn't hide anything )

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍 Agree.

@mattisonchao mattisonchao requested a review from merlimat August 28, 2025 15:47
@merlimat merlimat merged commit 7b12926 into main Aug 28, 2025
8 checks passed
@merlimat merlimat deleted the avoid_close_without_response branch August 28, 2025 15:56
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.

Java client can't put value and keep printing seesion not found.

2 participants