DESCRIPTION

JCBC-582: Bucket details loading fails if bucket > 2gb

Motivation:

DefaultAsyncClusterManager.getBuckets() fails with
a ClassCastException if a bucket quota exceeds
2048 mega bytes. In addition the returned value
does not represent the correct quota size.

Modifications:

The JSON response from the Couchbase server returns
the quota as bytes not mega bytes in a long value.
As soon as the quota is greater than the max integer
the quota cannot be cast into the target variable.

So we divide the returned value by 1024² to get the
correct quota size in mega bytes and cast this to
an integer value.

Result:

Fixes the ClassCastException and the quota size.

Change-Id: Ib26e0341a3bc779e27bcdf9fd82001ecec742eb6
Reviewed-on: http://review.couchbase.org/42076
Reviewed-by: Natasha Sullivan xxx@xxx.xxx
Tested-by: Natasha Sullivan xxx@xxx.xxx


COMMENTS

author: Natasha Sullivan
date: 2014-10-13 14:04:05.432000000

Change has been successfully cherry-picked as 5f173bcfc142a3b54951a5016c4245e7861a73e9

-------------------------------------
