Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ext/couchbase
12 changes: 12 additions & 0 deletions ext/rcb_buckets.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,18 @@ cb_extract_bucket_settings(const core::management::cluster::bucket_settings& ent
break;
}
}
switch (entry.storage_backend) {
case core::management::cluster::bucket_storage_backend::couchstore:
rb_hash_aset(
bucket, rb_id2sym(rb_intern("storage_backend")), rb_id2sym(rb_intern("couchstore")));
break;
case core::management::cluster::bucket_storage_backend::magma:
rb_hash_aset(bucket, rb_id2sym(rb_intern("storage_backend")), rb_id2sym(rb_intern("magma")));
break;
case core::management::cluster::bucket_storage_backend::unknown:
rb_hash_aset(bucket, rb_id2sym(rb_intern("storage_backend")), Qnil);
break;
}
if (entry.history_retention_collection_default.has_value()) {
rb_hash_aset(bucket,
rb_id2sym(rb_intern("history_retention_collection_default")),
Expand Down
2 changes: 1 addition & 1 deletion lib/couchbase/management/bucket_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ def initialize(backend)
def create_bucket(settings, options = Options::Bucket::CreateBucket.new)
@backend.bucket_create(
{

name: settings.name,
flush_enabled: settings.flush_enabled,
ram_quota_mb: settings.ram_quota_mb,
Expand Down Expand Up @@ -342,6 +341,7 @@ def extract_bucket_settings(entry)
bucket.minimum_durability_level = entry[:minimum_durability_level]
bucket.compression_mode = entry[:compression_mode]
bucket.instance_variable_set(:@healthy, entry[:nodes].all? { |node| node[:status] == "healthy" })
bucket.storage_backend = entry[:storage_backend]
bucket.history_retention_collection_default = entry[:history_retention_collection_default]
bucket.history_retention_bytes = entry[:history_retention_bytes]
bucket.history_retention_duration = entry[:history_retention_duration]
Expand Down
Loading