tablecmds: fix Deadlock caused by Attach Partition

tablecmds: fix Deadlock caused by Attach Partition

Edit