krishan1390 commented on PR #5443: URL: https://github.com/apache/hadoop/pull/5443#issuecomment-1455462818
@slfan1989 @goiri let me try to summarise my changes better 1. I am refactoring router secret manager to a completely stateless setup which now provides read after write consistency. As part of the change, I am doing away with instance variables and only relying on database reads/writes. This is to better handle edge cases like - cancel token is called on 1 router instance and cancelled but isn't cancelled on another router instance because its already cached as an instance variables. - token cleanup on expiry requires all tokens to be in instance variables across routers. This isn't true in a stateless setup where nodes are autoscaled up/down on demand. - instance variables are updated but database update fails. This means subsequent requests can respond differently in 1 router instance (where instance variables are updated) and differently in other router instances (which don't see the database update) This also makes the design more extendible for future use cases where Delegation token object contains more mutable data. I have added a bunch of test cases to showcase these edge cases better. It will be useful to comment on these individual test cases if any concerns. 2. I have explicitly handled methods which don't apply to stateless routers like setSequenceNo, getSequenceNo - these methods were primarily required in RM / NN to support recovery but in stateless setup they aren't required because by design multiple router instances can serve tokens. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
