traverse: Wait till all data has been flushed from output queue
commitf1f1788f103677a9a96fd25562750df234274676
authorAmitay Isaacs <amitay@gmail.com>
Tue, 10 Sep 2013 07:52:26 +0000 (10 17:52 +1000)
committerAmitay Isaacs <amitay@gmail.com>
Wed, 25 Sep 2013 04:59:45 +0000 (25 14:59 +1000)
treef673a2efe96d95dafe69f10dda0cd99930374618
parent1740cbb58c0d3af97d3d037db2f63afbce62e1fb
traverse: Wait till all data has been flushed from output queue

To improve the traverse performance, records are directly sent from
traverse child process to the originating node.  Make sure that all the
data is sent via socket, before informing ctdbd that traverse is complete.

Without waiting for all the packets to be flushed from the queue,
child process can incorrectly signal ctdbd that traverse has ended.
This will cause the pending records in the queue never to make it to
the originating node and traverse information will not be complete.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 482ac708cb79cb6378d814a79c2cf13f88435bc4)
ctdb/server/ctdb_traverse.c