stats: fix data race when update leader uptime