dlmarion commented on PR #6139:
URL: https://github.com/apache/accumulo/pull/6139#issuecomment-3934143712

   I went back and looked at how I implemented the locking in #3262 , the 
Multiple Manager PR from almost 3 years ago (I can't believe it's been that 
long). This comment isn't a suggestion to change what you have here, just 
pointing out an alternative that may or may not help.
   
     1. In the Manager class I changed the locking such that each Manager got 
its own lock at the same path that it's using today, but it's not an exclusive 
lock. Then I added a new path for the "primary manager".
     2. I modified ManagerClient.getManagerConnection to return the address of 
the primary manager when the client wanted to communicate with specific RPC 
endpoints that only the primary manager handled.
     3. I the Manager class I added a property for the expected number of 
Managers, and blocked all of the Managers from fully starting until that number 
had been reached. Much like it does for tablet servers. 
     4. There is a LiveManagerSet implementation that might be of use, it 
behaves just like LiveTServerSet to listen and notify for changes to the number 
of servers.
     5. One difference I see between this and #3262 is that in #3262 the Thrift 
RPC server is started before the manager gets its lock. Before the lock is 
obtained some fake ServiceDescriptors are added to the ServiceLockData so that 
clients cannot connect. After the lock is obtained, the lock data is updated 
with the correct host and port information that we want to advertise for that 
type of Manager (primary vs active secondary).


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