MB-23639: Fix potential overflow of persisted_seqno in CMD_SEQNO_PERSISTENCE
MB-23639: Fix potential overflow of persisted_seqno in CMD_SEQNO_PERSISTENCE

Using uint16_t for persisted_seqno can cause overflow and might lead
to rebalance failures in Ephemeral buckets and slower rebalance in
couchbase buckets.

Rebalance hang: if indeed persisted_seqno == seqno_waited_on
(high_seqno), but not seen as such due to overflow, then ns_server
will wait for a notification which will never get triggered as there
would be no new mutation (as the vb has already reached high_seqno).

In Couchbase buckets, flusher task will sleep for less than
DEFAULT_MAX_SLEEP_TIME and every time it runs, it will notify any high
priority vb requests.

In Ephemeral buckets, we do not have flusher task and hence can result
in rebalance hang forever.

This commit changes persisted_seqno type from uint16_t to uint64_t.

Change-Id: Ib0caa33b5536744bece64c2e8ab76efa2b841c72
Reviewed-on: http://review.couchbase.org/76140
Tested-by: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>
Reviewed-by: Trond Norbye <60edd2ef23891a753f231b0c6f161dc634079a93@gmail.com>

daverigby/kv_engine,couchbase/ep-engine,couchbase/ep-engine,daverigby/kv_engine,membase/ep-engine,membase/ep-engine,membase/ep-engine,membase/ep-engine,couchbase/ep-engine,daverigby/kv_engine,daverigby/kv_engine,couchbase/ep-engine