@@ -221,6 +221,7 @@ def create_bucket(settings, options = Options::Bucket::CreateBucket.new)
221
221
history_retention_collection_default : settings . history_retention_collection_default ,
222
222
history_retention_duration : settings . history_retention_duration ,
223
223
history_retention_bytes : settings . history_retention_bytes ,
224
+ num_vbuckets : settings . num_vbuckets ,
224
225
} , options . to_backend
225
226
)
226
227
end
@@ -251,6 +252,7 @@ def update_bucket(settings, options = Options::Bucket::UpdateBucket.new)
251
252
history_retention_collection_default : settings . history_retention_collection_default ,
252
253
history_retention_bytes : settings . history_retention_bytes ,
253
254
history_retention_duration : settings . history_retention_duration ,
255
+ num_vbuckets : settings . num_vbuckets ,
254
256
} , options . to_backend
255
257
)
256
258
end
@@ -345,6 +347,7 @@ def extract_bucket_settings(entry)
345
347
bucket . history_retention_collection_default = entry [ :history_retention_collection_default ]
346
348
bucket . history_retention_bytes = entry [ :history_retention_bytes ]
347
349
bucket . history_retention_duration = entry [ :history_retention_duration ]
350
+ bucket . num_vbuckets = entry [ :num_vbuckets ]
348
351
end
349
352
end
350
353
end
@@ -405,7 +408,7 @@ class BucketSettings
405
408
# @return [nil, :none, :majority, :majority_and_persist_to_active, :persist_to_majority] the minimum durability level
406
409
attr_accessor :minimum_durability_level
407
410
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
409
412
attr_accessor :history_retention_collection_default
410
413
411
414
# @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
416
419
# collections in this bucket
417
420
attr_accessor :history_retention_duration
418
421
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
+
419
425
# @api private
420
426
# @return [Boolean] false if status of the bucket is not healthy
421
427
def healthy?
0 commit comments