indigophox commented on code in PR #40284:
URL: https://github.com/apache/arrow/pull/40284#discussion_r1509593351
##########
cpp/src/arrow/flight/sql/server_session_middleware.cc:
##########
@@ -80,7 +80,7 @@ class ServerSessionMiddlewareImpl : public
ServerSessionMiddleware {
Status CloseSession() override {
const std::lock_guard<std::shared_mutex> l(mutex_);
- if (static_cast<bool>(session_)) {
+ if (!static_cast<bool>(session_)) {
Review Comment:
@joellubi ultimately this is scoped to the implementation, so anyone
building an app against this can do as they please. The shipped
ServerSessionMiddleware just handles the internals; the actual RPC handler can
do whatever the app author wants. I am hoping we can close on #40071 fairly
soon (before 16.0.0 code freeze?) so the full functionality can be restored.
I'll resume the discussion over there and hopefully that can get wrapped up
with the existing solution or another one.
My other thought for an if-we-have-to-go-down-that-road workaround is for
the middleware to internally flag the token as invalidated, so it can expire it
next time it's presented instead of outright treating it as invalid, or
alternatively (say you're calling SetSessionOptions) just clobber it with a new
token for a new session as appropriate. But again this is dumping work into a
temporary hack while we sort out the root issue with middleware handling
behaviour.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]