Wait tx state buffer in flush_set

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>