You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//# - The [number of buckets](#max-buckets) defined in the associated [beacon version](#beacon-version-initialization).
70
+
//# - The logical table name for this defined in the associated [table config](../dynamodb-encryption-client/ddb-table-encryption-config.md#structure).
//# If an item is being written or queried as bucket `X`, but the [standard beacon](#standard-beacon-initialization) is constrained to only `N` buckets,
152
+
//# then the bucket used to [encode](#bucket-beacon-encoding) the beacon MUST be `X % N`, where `%` is the modulo or remainder operation.
var maxBuckets : BucketCount := config.maximumNumberOfBuckets.UnwrapOr(1);
334
-
var defaultBuckets : BucketCount := config.defaultNumberOfBuckets.UnwrapOr(maxBuckets);
335
-
:-Need(0 <= maxBuckets as nat < MAX_BUCKET_COUNT, E("Invalid number of buckets specified, " + Base10Int2String(maxBuckets as int) + ", must be 0 < maximumNumberOfBuckets <= 255."));
336
+
:-Need(0 <= maxBuckets as nat < MAX_BUCKET_COUNT, E("Invalid maximumNumberOfBuckets specified, " + Base10Int2String(maxBuckets as int) + ", must be 0 < maximumNumberOfBuckets <= 255."));
336
337
// Zero is invalid, but in Java we can't distinguish None from Some(0)
337
338
if maxBuckets == 0 {
338
339
maxBuckets := 1;
339
340
}
340
-
if defaultBuckets == 0 {
341
+
342
+
var defaultBucketsOpt : Option<BucketCount>:= config.defaultNumberOfBuckets;
//# Initialization MUST fail if [number of buckets](#beacon-constraint) is specified, and is greater than or equal to
625
+
//# the maximum number of buckets specified in the [beacon version](search-config.md#beacon-version-initialization).
605
626
Failure(E("Constrained numberOfBuckets for " + name + " is " + Base10Int2String(inner.value as int) + " but it must be less than the maximumNumberOfBuckets " +Base10Int2String(maxBuckets as int)))
0 commit comments