indigophox commented on PR #34817:
URL: https://github.com/apache/arrow/pull/34817#issuecomment-1903348681

   @lidavidm So I ran into an unexpected issue with my C++ 
ServerSessionMiddleware tests and so far it looks like the root cause is that 
the server middleware is being mid-handled by the framework.  So far I am 
seeing SendingHeaders() for a given call-local middleware instance called 
-before- any of the interactions between the RPC handler and the middleware 
instance it's able to extract from the ServerCallContext, e.g.:
   
   ```
   ServerSessionMiddlewareFactory::StartCall: session_store_.size() is 0
   ServerSessionMiddlewareImpl@0x12960b588 Did not add set-cookie header, 
existing_session is: 0, session_ is: 0x0
   ServerSessionMiddlewareImpl@0x12960b588 Created new session with id 1000, 
address 0x6000030d4a98
   ServerSessionMiddlewareImpl@0x12960b588 Returning session at 0x6000030d4a98
   Setting option bardouble
   FlightSession now contains 1 entries
   Session now contains FlightSession returning SessionOptions map of size 1
   1
   Setting option big_ol_string_list
   FlightSession now contains 2 entries
   Session now contains FlightSession returning SessionOptions map of size 2
   2
   Setting option foolong
   FlightSession now contains 3 entries
   Session now contains FlightSession returning SessionOptions map of size 3
   3
   Looking for set-cookie header...
   ServerSessionMiddlewareFactory::StartCall: session_store_.size() is 1
   ServerSessionMiddlewareImpl@0x12c804408 Did not add set-cookie header, 
existing_session is: 0, session_ is: 0x0
   ServerSessionMiddlewareImpl@0x12c804408 Created new session with id 1001, 
address 0x6000030d0018
   ServerSessionMiddlewareImpl@0x12c804408 Returning session at 0x6000030d0018
   FlightSession returning SessionOptions map of size 0
   Server returning GetSessionOptionsResult: <GetSessionOptionsResult 
session_options={}>
   Looking for set-cookie header...
   ```
   
   Note that the "Did not add set-cookie header" is from SendingHeaders and the 
session creation/etc is from the RPC handler touching the middleware instance...


-- 
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]

Reply via email to