Improve performance by avoiding using locks in RoutingTable (server core)
Description
RoutingTableImpl is using a ReentrantReadWriteLock that only allows one thread to write and many threads to read. So if many users are logging in and logging out then all those operations will be serialized. Moreover, while a write operation is taking place (.e.g. user logs in/out) other threads are not able to read the table thus blocking all the reading threads until the write operation finishes.
It was also detected that under certain circumstances the ReentrantReadWriteLock may remain in an inconsistent state thus blocking the whole server. We just need to remove the ReentrantReadWriteLock and also support concurrent operations.
RoutingTableImpl is using a ReentrantReadWriteLock that only allows one thread to write and many threads to read. So if many users are logging in and logging out then all those operations will be serialized. Moreover, while a write operation is taking place (.e.g. user logs in/out) other threads are not able to read the table thus blocking all the reading threads until the write operation finishes.
It was also detected that under certain circumstances the ReentrantReadWriteLock may remain in an inconsistent state thus blocking the whole server. We just need to remove the ReentrantReadWriteLock and also support concurrent operations.