Creating a bucket with NRU ejection

Hi,

I am creating an Ephermal bucket with this code:

clusterManager.CreateBucket(“myBucket”, 100, Couchbase.Core.Buckets.BucketTypeEnum.Ephemeral, ReplicaNumber.Zero, Couchbase.Authentication.AuthType.None, false, true, false, “”, ThreadNumber.Three);

But in the web console I see that the ejection method is set to “No ejection”.
How can I set it with “NRU ejection” ?

Hello alon.schachter,

Thanks for asking this question.

Currently, SDK doesn’t support eviction policy setting and we have raised a ticket to support it. Here is the ticket if you want to follow up: https://issues.couchbase.com/browse/NCBC-1913

Not sure if it is okay for you to use the REST api with the required settings? Here is the reference: https://docs.couchbase.com/server/6.0/rest-api/rest-bucket-create.html

Thanks,
Ritesh

Thank you for your answer @ritesh.agarwal
I guess I will have to call the REST api…

Your ticket however does not cover everything.
It only requests that this parameter will be available in Couchbase type buckets.

There is no mention there about Epehermal type buckets which do not use Full / value ejections but NRU / no ejections

And now that I’m reading about it, the REST api also doesn’t mention how to set NRU ejection on Ephermal buckets…
Only settings are Full or Value.
https://docs.couchbase.com/server/5.0/rest-api/rest-bucket-create.html

The CLI however does seem to address both bucket types (thank god).
https://docs.couchbase.com/server/5.0/cli/cbcli/couchbase-cli-bucket-create.html