replica=3
replace pthread_mutex_t with pthread_spinlock_t