@@ -221,6 +221,7 @@ def create_bucket(settings, options = Options::Bucket::CreateBucket.new)
221221 history_retention_collection_default : settings . history_retention_collection_default ,
222222 history_retention_duration : settings . history_retention_duration ,
223223 history_retention_bytes : settings . history_retention_bytes ,
224+ num_vbuckets : settings . num_vbuckets ,
224225 } , options . to_backend
225226 )
226227 end
@@ -251,6 +252,7 @@ def update_bucket(settings, options = Options::Bucket::UpdateBucket.new)
251252 history_retention_collection_default : settings . history_retention_collection_default ,
252253 history_retention_bytes : settings . history_retention_bytes ,
253254 history_retention_duration : settings . history_retention_duration ,
255+ num_vbuckets : settings . num_vbuckets ,
254256 } , options . to_backend
255257 )
256258 end
@@ -345,6 +347,7 @@ def extract_bucket_settings(entry)
345347 bucket . history_retention_collection_default = entry [ :history_retention_collection_default ]
346348 bucket . history_retention_bytes = entry [ :history_retention_bytes ]
347349 bucket . history_retention_duration = entry [ :history_retention_duration ]
350+ bucket . num_vbuckets = entry [ :num_vbuckets ]
348351 end
349352 end
350353 end
@@ -405,7 +408,7 @@ class BucketSettings
405408 # @return [nil, :none, :majority, :majority_and_persist_to_active, :persist_to_majority] the minimum durability level
406409 attr_accessor :minimum_durability_level
407410
408- # @return [Boolean, nil] whether to enable history retention on collections by default
411+ # @return [Boolean, nil] whether to enable history retention on collections by default
409412 attr_accessor :history_retention_collection_default
410413
411414 # @return [Integer, nil] the maximum size, in bytes, of the change history that is written to disk for all
@@ -416,6 +419,9 @@ class BucketSettings
416419 # collections in this bucket
417420 attr_accessor :history_retention_duration
418421
422+ # @return [Integer, nil] the number of vBuckets the bucket should have. If not set, the server default will be used
423+ attr_accessor :num_vbuckets
424+
419425 # @api private
420426 # @return [Boolean] false if status of the bucket is not healthy
421427 def healthy?
0 commit comments