Fixes data loss issue when  partition table is being synced and a node gracefully shutdown

Fixes #2804