keith-turner opened a new issue, #3633: URL: https://github.com/apache/accumulo/issues/3633
In the tablet server method [getTabletSession()](https://github.com/apache/accumulo/blob/8456f0597bf81d2b79537066a6f050614a7411b7/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java#L925-L937) it calls [ServiceLock.getSessionId()](https://github.com/apache/accumulo/blob/8456f0597bf81d2b79537066a6f050614a7411b7/core/src/main/java/org/apache/accumulo/core/lock/ServiceLock.java#L714-L726) which makes multiple calls to zookeeper. Within the tablet server process the session id should be invariant, so going to zookeeper each time adds cost to things in the tserver that call this. Also its not clear that this is correct. In the case where tablet server has lost its lock and has not terminated yet when it calls this method it will get the other tserver process session id. There is a [ServiceLock.getLockID()](https://github.com/apache/accumulo/blob/8456f0597bf81d2b79537066a6f050614a7411b7/core/src/main/java/org/apache/accumulo/core/lock/ServiceLock.java#L579-L584) that calls zooKeeper.getSessionId(). This makes sense to use in the process that acquired the lock, but not outside. Maybe TabletServer.getTabletSession() could use ServiceLock.getLockID() to get the session id or cache the session id. Noticed this while working on #3625. Not completely sure its a problem, opening issue for follow up. -- 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]
