You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[p2]Session move assignment transfers the ID but not the connection or owning pool #148
Please check the FAQ documentation before raising an issue
Describe the bug (required)
The current Session::operator=(Session&&) transfers only the session ID and some string/time-zone state. It does not release the destination's existing session, and it does not move the connection, the owning-pool pointer, the reconnect setting, or the broken-connection state. This can combine the source session ID with the destination's old connection and pool. The source connection is not returned to its original pool, and the destination's destructor may return the old connection to the wrong pool.
Your Environments (required)
OS: ubuntu
Commit id : master lastest
Reproduction steps
Initialize two different ConnectionPool instances and obtain one valid Session from each.
Execute destination = std::move(source).
Check whether the destination has the source session ID; after both sessions leave scope, check the number of idle connections in each pool.
nebula::ConnectionPool poolA, poolB;
// Initialize both pools and obtain sessionA and sessionB from them.constauto sourceId = sessionB.sessionId_; // Inspect internal state in a test.
sessionA = std::move(sessionB);
// Current behavior: sessionA gets sourceId but still refers to poolA;// sessionB is marked invalid.
Expected behavior
Safely release the destination's old session, then transfer the source session's ID, connection, pool ownership, and related state as a unit. The source should become a safe moved-from object that no longer owns a session or connection. When the scope ends, each pool should recover its own connection.
Actual behavior
The targeted reproduction observed that the destination still referred to its original pool, while the source became invalid and its original pool had zero idle connections. The source connection was not returned to its original pool.
changed the title [-]Session move assignment transfers the ID but not the connection or owning pool[/-][+][p2]Session move assignment transfers the ID but not the connection or owning pool[/+]on Oct 15, 2026
Activity
[-]Session move assignment transfers the ID but not the connection or owning pool[/-][+][p2]Session move assignment transfers the ID but not the connection or owning pool[/+]