DCP Backfill: Use size_t instead of uint32_t to record mem usage 70/77270/2
authorManu Dhundi <manu@couchbase.com>
Mon, 24 Apr 2017 16:21:04 +0000 (09:21 -0700)
committerManu Dhundi <manu@couchbase.com>
Mon, 24 Apr 2017 17:28:49 +0000 (17:28 +0000)
commit26d87382c1e703a9479ed08d5a001bee5e86cfb8
tree16f754e4bd25abc5f749e4e2baa5de869a7590f8
parent3f816b0995fc7919da3d556144d303ba4cfd9a52
DCP Backfill: Use size_t instead of uint32_t to record mem usage

We keep a record of DCP backfill memory usage to ensure that backfill
memory usage is bounded by a finite size (backfill buffer size).

We must consistently use size_t instead of uint32_t so that there is
no overflow error.

Change-Id: I01d0548b7d1cf3081b11bf96aec7868956c0bb6f
Reviewed-on: http://review.couchbase.org/77270
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>
src/dcp/backfill-manager.cc
src/dcp/backfill-manager.h
src/dcp/producer.cc
src/dcp/producer.h
src/dcp/stream.h