sample code to reproduce the Primary Restart Issue