)]}'
{"oslo_vmware/api.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f63680be592c172f1e15c9df4d1dd59af61ce47a","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        LOG.info(_LI(\"Successfully established new session; session ID is \""},{"line_number":230,"context_line":"                     \"%s.\"),"},{"line_number":231,"context_line":"                 _trunc_id(self._session_id))"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        # Terminate the previous session (if exists) for preserving sessions"},{"line_number":234,"context_line":"        # as there is a limit on the number of sessions we can have."},{"line_number":235,"context_line":"        if prev_session_id:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a930d6b_dee3a403","side":"PARENT","line":232,"updated":"2015-01-21 07:27:26.000000000","message":"why are we removing this code?","commit_id":"2df3a6200ab5f87dc01a809ae31329087ff87b4d"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"7ce223beb3c374461eba75a00a7774c2cc451b6e","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        LOG.info(_LI(\"Successfully established new session; session ID is \""},{"line_number":230,"context_line":"                     \"%s.\"),"},{"line_number":231,"context_line":"                 _trunc_id(self._session_id))"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        # Terminate the previous session (if exists) for preserving sessions"},{"line_number":234,"context_line":"        # as there is a limit on the number of sessions we can have."},{"line_number":235,"context_line":"        if prev_session_id:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a930d6b_f91cfa6c","side":"PARENT","line":232,"in_reply_to":"1a930d6b_dee3a403","updated":"2015-01-21 08:05:06.000000000","message":"Two reasons:\n\na) _create_session is called only if the current session is not active. There are two places from where it is called and we check for active session at both the places. \n\nThis is also the reason why we are seeing log messages \"Session not found\" while calling TerminateSession.\n\nb) Assume that some new code call _create_session without checking for active session. Then the control won\u0027t reach here because of the new check at line 220. The case is same if two threads check for active session, found to be inactive and then one of them creates the session while the other is waiting for the lock. The second one will find the session to be active due to the new check and return without creating a new session within an active session.\n\n---\n\nAnother way to look at this is,\nvCenter will thrown an error if we try to login within an active session. Assume that there is a session which we need to terminate. Then the previous Login call would have failed even before the control reaches here.","commit_id":"2df3a6200ab5f87dc01a809ae31329087ff87b4d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f63680be592c172f1e15c9df4d1dd59af61ce47a","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        \"\"\"Establish session with the server.\"\"\""},{"line_number":218,"context_line":"        # Another thread might have created the session while the current one"},{"line_number":219,"context_line":"        # was waiting for the lock."},{"line_number":220,"context_line":"        if self._session_id and self.is_current_session_active():"},{"line_number":221,"context_line":"            LOG.debug(\"Current session: %s is active.\","},{"line_number":222,"context_line":"                      _trunc_id(self._session_id))"},{"line_number":223,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a930d6b_1eee0ced","line":220,"updated":"2015-01-21 07:27:26.000000000","message":"nice","commit_id":"a229faf8ba59724a4fda3f37d5a7473376f93d9c"}]}
