Improvement on replication, locking and index lifecycle management