Description
Currently after each segment we read in on the standby, we re-calculate all of the quota/usage information throughout the directory tree. This is inefficient. There are two potential optimizations: (a) we could maintain the quotas incrementally as edits are read, or (b) we could defer all quota computation until the node transitions to active mode. (b) is probably less bug-prone.
This is not a crucial optimization since in the worst case it might just delay failover by a few extra seconds (the time to traverse the in-memory FSDirectory)