Skip to content

Unify Session close behavior across outstanding RPCs #5534

@devinrsmith

Description

@devinrsmith

As part of #5433, it was noted that the behavior for outstanding RPCs when a Session is closed is varied. Some outstanding RPCs get a CANCELLED status, some get UNAUTHENTICATED, and some complete successfully (there may be other responses as well). io.deephaven.server.session.SessionServiceCloseTest documents this behavior.

Right now, the responsibility to cancel (or complete) an RPC on session close is left to the implementation of every individual RPC (and that is part of the reason for the bugs in #5433). We should be able to do much better with a centralized implementation. A centralized solution for ConsoleService.SubscribeToLogs and ObjectService.MessageStream was added in io.deephaven.server.session.SessionServiceGrpcImpl.SessionServiceInterceptor, and this should be generalizable to other RPCs.

While this may seem relevant only for streaming RPCs, this is also applicable for unary RPCs. For example, SessionService.TerminationNotification is an unary RPC that is long-lived. And even for other unary RPCs, a misimplemented or malicious client may be otherwise able to exhaust server resources past a Session close by not half-closing an unary RPC.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtriage

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions