row_cache: Deal with side-effects in allocating_section
row_cache: Deal with side-effects in allocating_section

In row_cache::make_reader, we update statistics inside an
allocating_section, which retries the supplied function until it can
satisfy all allocations by way of reserving LSA memory up front. Since
those updates are interleave with allocations, retries can lead to
miscounts.

This patch fixes this by updating statistics after all allocations.

Fixes #1659

Signed-off-by: Duarte Nunes <a60e8b7496f7715d71354fe4c06dd24017025bf1@scylladb.com>
Message-Id: <1473845977-20205-1-git-send-email-a60e8b7496f7715d71354fe4c06dd24017025bf1@scylladb.com>

avikivity/scylla,duarten/scylla,raphaelsc/scylla,raphaelsc/scylla,scylladb/scylla,raphaelsc/scylla,scylladb/scylla,duarten/scylla,avikivity/scylla,avikivity/scylla,duarten/scylla,scylladb/scylla,scylladb/scylla