Materialized views: fix accidental zeroing of flow-control delay
Materialized views: fix accidental zeroing of flow-control delay

The materialized-views flow control carefully calculates an amount of
microseconds to delay a client to slow it down to the desired rate -
but then a typo (std::min instead of std::max) causes this delay to
be zeroed, which in effect completely nullifies the flow control
algorithm.

Before this fix, experiments suggested that view flow control was
not having any effect and view backlog not bounded at all. After this
fix, we can see the flow control having its desired effect, and the
view backlog converging.

Fixes #4143.

Signed-off-by: Nadav Har'El <625169824b719df98706d88646d0aae6f368ae4d@scylladb.com>
Message-Id: <20190226161452.498-1-625169824b719df98706d88646d0aae6f368ae4d@scylladb.com>

avikivity/scylla,scylladb/scylla,scylladb/scylla,scylladb/scylla,avikivity/scylla,avikivity/scylla,scylladb/scylla