nebula icon indicating copy to clipboard operation
nebula copied to clipboard

session manager bugs

Open lee-qiu opened this issue 1 year ago • 1 comments

Describe the bug (required) when connection to graph is broken, client will pick another idle connection to send the request with previous session id, then there will be 2 graph servers share one session in the local cache. as times goes by, one graph may remove this session for that it idle for a long time, then another one will miss error when it try to update sessions in local cache to meta.

How To Reproduce(required) Steps to reproduce the behavior:

  1. create session id with one connection to graph 1
  2. send query with this session id and another connection to graph 2
  3. update graph 1's session_idle_timeout_secs to a small value
  4. wait session idle exceed the session_idle_timeout_secs and removed by graph 1 in meta
  5. observe the log of graph 2, you will find logs like 'Update sessions failed:'

Expected behavior when session is used in another graph, we expect the previous one don't use it again but it seems not.

Other bugs hidden(required) There is a lot of information in a session, such as current space name. When the graph loads a session that belongs to other sessions, it will restore the relevant information, but there is a big risk that this information may be out of date. for example: user has already switched to another space but not updated in meta immediately, then user think I am read or write in space A actually space B, it is really horrifying.

lee-qiu avatar Jun 09 '23 06:06 lee-qiu

@wey-gu sorry, it's a little late to raise this issue and my English is a little poor. I raise 2 bugs for this situation. I suggest not recover the space info when load session from meta to fix the second bug. as for the previous one, I have no better resolution except following:

  1. forbid load session of other graphs from meta and it is easy to fix
  2. update graph address when load sessions from meta and forbid graph update/remove session of other graph

lee-qiu avatar Jun 09 '23 07:06 lee-qiu