I’m in the process of upgrading from SDK2 to SDK3 and I’m trying to figure out how to implement this SDK2 code in .NET5 as it seem to be missing from your docs:
// get total ram allocated
var info = clusterManager.ClusterInfo();
StorageTotals storageTotals = info.Value.Pools().StorageTotals;
long totalMachineRam = storageTotals.Ram.QuotaTotal;
Also, I’ve noticed when using Buckets.CreateBucketAsync to create a bucket that already exist, it doesn’t throw an exception. It also doesn’t seem to return anything to let me know the action was successful unlike in SDK2.
I have also been trying to use
var bucket = CouchbaseConnection.Buckets.GetBucketAsync(bucketName).GetAwaiter().GetResult();
But for an existing bucket I get an exception:
ArgumentNullException: Value cannot be null. (Parameter 'value')
Newtonsoft.Json.Utilities.ValidationUtils.ArgumentNotNull(object value, string parameterName)
The ticket about the ArgumentNullException seems to be regarding GetAllBucketAsync.
The issue is also with GetBucketAsync and GetUserAsync (at least).
And the ticket is referring to an unavailable node… My node is available. Not sure if you guys diagnosed the problem correctly then…
As for the ClusterInfo method, I just needed to get the total ram available on the machine and with .NET core it seems to be a hassle unlike in .NET Framework, so I was hoping you’ve implemented some server info class