Introduce a rwlock for write operations to avoid taking lots of read locks during dump operation