From cb089dcb52f0bc8eb58a4c991dfd92a0fec13e62 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Fri, 4 Aug 2023 10:40:21 -0700 Subject: [PATCH] error out by default beyond 10000 versions per object (#17803) ``` You've exceeded the limit on the number of versions you can create on this object ``` --- cmd/api-errors.go | 8 + cmd/apierrorcode_string.go | 415 ++++++++++++++++++------------------ cmd/storage-errors.go | 5 +- cmd/xl-storage-format-v2.go | 29 +++ cmd/xl-storage.go | 1 + docs/minio-limits.md | 31 +-- 6 files changed, 266 insertions(+), 223 deletions(-) diff --git a/cmd/api-errors.go b/cmd/api-errors.go index e8dd7969f..a1f930215 100644 --- a/cmd/api-errors.go +++ b/cmd/api-errors.go @@ -190,6 +190,7 @@ const ( ErrMaximumExpires ErrSlowDownRead ErrSlowDownWrite + ErrMaxVersionsExceeded ErrInvalidPrefixMarker ErrBadRequest ErrKeyTooLongError @@ -857,6 +858,11 @@ var errorCodes = errorCodeMap{ Description: "Resource requested is unwritable, please reduce your request rate", HTTPStatusCode: http.StatusServiceUnavailable, }, + ErrMaxVersionsExceeded: { + Code: "MaxVersionsExceeded", + Description: "You've exceeded the limit on the number of versions you can create on this object", + HTTPStatusCode: http.StatusBadRequest, + }, ErrInvalidPrefixMarker: { Code: "InvalidPrefixMarker", Description: "Invalid marker prefix combination", @@ -2110,6 +2116,8 @@ func toAPIErrorCode(ctx context.Context, err error) (apiErr APIErrorCode) { apiErr = ErrSlowDownRead case errErasureWriteQuorum: apiErr = ErrSlowDownWrite + case errMaxVersionsExceeded: + apiErr = ErrMaxVersionsExceeded // SSE errors case errInvalidEncryptionParameters: apiErr = ErrInvalidEncryptionParameters diff --git a/cmd/apierrorcode_string.go b/cmd/apierrorcode_string.go index 68980c83b..0a07f146a 100644 --- a/cmd/apierrorcode_string.go +++ b/cmd/apierrorcode_string.go @@ -121,216 +121,217 @@ func _() { _ = x[ErrMaximumExpires-110] _ = x[ErrSlowDownRead-111] _ = x[ErrSlowDownWrite-112] - _ = x[ErrInvalidPrefixMarker-113] - _ = x[ErrBadRequest-114] - _ = x[ErrKeyTooLongError-115] - _ = x[ErrInvalidBucketObjectLockConfiguration-116] - _ = x[ErrObjectLockConfigurationNotFound-117] - _ = x[ErrObjectLockConfigurationNotAllowed-118] - _ = x[ErrNoSuchObjectLockConfiguration-119] - _ = x[ErrObjectLocked-120] - _ = x[ErrInvalidRetentionDate-121] - _ = x[ErrPastObjectLockRetainDate-122] - _ = x[ErrUnknownWORMModeDirective-123] - _ = x[ErrBucketTaggingNotFound-124] - _ = x[ErrObjectLockInvalidHeaders-125] - _ = x[ErrInvalidTagDirective-126] - _ = x[ErrPolicyAlreadyAttached-127] - _ = x[ErrPolicyNotAttached-128] - _ = x[ErrExcessData-129] - _ = x[ErrInvalidEncryptionMethod-130] - _ = x[ErrInvalidEncryptionKeyID-131] - _ = x[ErrInsecureSSECustomerRequest-132] - _ = x[ErrSSEMultipartEncrypted-133] - _ = x[ErrSSEEncryptedObject-134] - _ = x[ErrInvalidEncryptionParameters-135] - _ = x[ErrInvalidEncryptionParametersSSEC-136] - _ = x[ErrInvalidSSECustomerAlgorithm-137] - _ = x[ErrInvalidSSECustomerKey-138] - _ = x[ErrMissingSSECustomerKey-139] - _ = x[ErrMissingSSECustomerKeyMD5-140] - _ = x[ErrSSECustomerKeyMD5Mismatch-141] - _ = x[ErrInvalidSSECustomerParameters-142] - _ = x[ErrIncompatibleEncryptionMethod-143] - _ = x[ErrKMSNotConfigured-144] - _ = x[ErrKMSKeyNotFoundException-145] - _ = x[ErrKMSDefaultKeyAlreadyConfigured-146] - _ = x[ErrNoAccessKey-147] - _ = x[ErrInvalidToken-148] - _ = x[ErrEventNotification-149] - _ = x[ErrARNNotification-150] - _ = x[ErrRegionNotification-151] - _ = x[ErrOverlappingFilterNotification-152] - _ = x[ErrFilterNameInvalid-153] - _ = x[ErrFilterNamePrefix-154] - _ = x[ErrFilterNameSuffix-155] - _ = x[ErrFilterValueInvalid-156] - _ = x[ErrOverlappingConfigs-157] - _ = x[ErrUnsupportedNotification-158] - _ = x[ErrContentSHA256Mismatch-159] - _ = x[ErrContentChecksumMismatch-160] - _ = x[ErrStorageFull-161] - _ = x[ErrRequestBodyParse-162] - _ = x[ErrObjectExistsAsDirectory-163] - _ = x[ErrInvalidObjectName-164] - _ = x[ErrInvalidObjectNamePrefixSlash-165] - _ = x[ErrInvalidResourceName-166] - _ = x[ErrInvalidLifecycleQueryParameter-167] - _ = x[ErrServerNotInitialized-168] - _ = x[ErrRequestTimedout-169] - _ = x[ErrClientDisconnected-170] - _ = x[ErrTooManyRequests-171] - _ = x[ErrInvalidRequest-172] - _ = x[ErrTransitionStorageClassNotFoundError-173] - _ = x[ErrInvalidStorageClass-174] - _ = x[ErrBackendDown-175] - _ = x[ErrMalformedJSON-176] - _ = x[ErrAdminNoSuchUser-177] - _ = x[ErrAdminNoSuchUserLDAPWarn-178] - _ = x[ErrAdminNoSuchGroup-179] - _ = x[ErrAdminGroupNotEmpty-180] - _ = x[ErrAdminGroupDisabled-181] - _ = x[ErrAdminNoSuchJob-182] - _ = x[ErrAdminNoSuchPolicy-183] - _ = x[ErrAdminPolicyChangeAlreadyApplied-184] - _ = x[ErrAdminInvalidArgument-185] - _ = x[ErrAdminInvalidAccessKey-186] - _ = x[ErrAdminInvalidSecretKey-187] - _ = x[ErrAdminConfigNoQuorum-188] - _ = x[ErrAdminConfigTooLarge-189] - _ = x[ErrAdminConfigBadJSON-190] - _ = x[ErrAdminNoSuchConfigTarget-191] - _ = x[ErrAdminConfigEnvOverridden-192] - _ = x[ErrAdminConfigDuplicateKeys-193] - _ = x[ErrAdminConfigInvalidIDPType-194] - _ = x[ErrAdminConfigLDAPNonDefaultConfigName-195] - _ = x[ErrAdminConfigLDAPValidation-196] - _ = x[ErrAdminConfigIDPCfgNameAlreadyExists-197] - _ = x[ErrAdminConfigIDPCfgNameDoesNotExist-198] - _ = x[ErrAdminCredentialsMismatch-199] - _ = x[ErrInsecureClientRequest-200] - _ = x[ErrObjectTampered-201] - _ = x[ErrSiteReplicationInvalidRequest-202] - _ = x[ErrSiteReplicationPeerResp-203] - _ = x[ErrSiteReplicationBackendIssue-204] - _ = x[ErrSiteReplicationServiceAccountError-205] - _ = x[ErrSiteReplicationBucketConfigError-206] - _ = x[ErrSiteReplicationBucketMetaError-207] - _ = x[ErrSiteReplicationIAMError-208] - _ = x[ErrSiteReplicationConfigMissing-209] - _ = x[ErrAdminRebalanceAlreadyStarted-210] - _ = x[ErrAdminRebalanceNotStarted-211] - _ = x[ErrAdminBucketQuotaExceeded-212] - _ = x[ErrAdminNoSuchQuotaConfiguration-213] - _ = x[ErrHealNotImplemented-214] - _ = x[ErrHealNoSuchProcess-215] - _ = x[ErrHealInvalidClientToken-216] - _ = x[ErrHealMissingBucket-217] - _ = x[ErrHealAlreadyRunning-218] - _ = x[ErrHealOverlappingPaths-219] - _ = x[ErrIncorrectContinuationToken-220] - _ = x[ErrEmptyRequestBody-221] - _ = x[ErrUnsupportedFunction-222] - _ = x[ErrInvalidExpressionType-223] - _ = x[ErrBusy-224] - _ = x[ErrUnauthorizedAccess-225] - _ = x[ErrExpressionTooLong-226] - _ = x[ErrIllegalSQLFunctionArgument-227] - _ = x[ErrInvalidKeyPath-228] - _ = x[ErrInvalidCompressionFormat-229] - _ = x[ErrInvalidFileHeaderInfo-230] - _ = x[ErrInvalidJSONType-231] - _ = x[ErrInvalidQuoteFields-232] - _ = x[ErrInvalidRequestParameter-233] - _ = x[ErrInvalidDataType-234] - _ = x[ErrInvalidTextEncoding-235] - _ = x[ErrInvalidDataSource-236] - _ = x[ErrInvalidTableAlias-237] - _ = x[ErrMissingRequiredParameter-238] - _ = x[ErrObjectSerializationConflict-239] - _ = x[ErrUnsupportedSQLOperation-240] - _ = x[ErrUnsupportedSQLStructure-241] - _ = x[ErrUnsupportedSyntax-242] - _ = x[ErrUnsupportedRangeHeader-243] - _ = x[ErrLexerInvalidChar-244] - _ = x[ErrLexerInvalidOperator-245] - _ = x[ErrLexerInvalidLiteral-246] - _ = x[ErrLexerInvalidIONLiteral-247] - _ = x[ErrParseExpectedDatePart-248] - _ = x[ErrParseExpectedKeyword-249] - _ = x[ErrParseExpectedTokenType-250] - _ = x[ErrParseExpected2TokenTypes-251] - _ = x[ErrParseExpectedNumber-252] - _ = x[ErrParseExpectedRightParenBuiltinFunctionCall-253] - _ = x[ErrParseExpectedTypeName-254] - _ = x[ErrParseExpectedWhenClause-255] - _ = x[ErrParseUnsupportedToken-256] - _ = x[ErrParseUnsupportedLiteralsGroupBy-257] - _ = x[ErrParseExpectedMember-258] - _ = x[ErrParseUnsupportedSelect-259] - _ = x[ErrParseUnsupportedCase-260] - _ = x[ErrParseUnsupportedCaseClause-261] - _ = x[ErrParseUnsupportedAlias-262] - _ = x[ErrParseUnsupportedSyntax-263] - _ = x[ErrParseUnknownOperator-264] - _ = x[ErrParseMissingIdentAfterAt-265] - _ = x[ErrParseUnexpectedOperator-266] - _ = x[ErrParseUnexpectedTerm-267] - _ = x[ErrParseUnexpectedToken-268] - _ = x[ErrParseUnexpectedKeyword-269] - _ = x[ErrParseExpectedExpression-270] - _ = x[ErrParseExpectedLeftParenAfterCast-271] - _ = x[ErrParseExpectedLeftParenValueConstructor-272] - _ = x[ErrParseExpectedLeftParenBuiltinFunctionCall-273] - _ = x[ErrParseExpectedArgumentDelimiter-274] - _ = x[ErrParseCastArity-275] - _ = x[ErrParseInvalidTypeParam-276] - _ = x[ErrParseEmptySelect-277] - _ = x[ErrParseSelectMissingFrom-278] - _ = x[ErrParseExpectedIdentForGroupName-279] - _ = x[ErrParseExpectedIdentForAlias-280] - _ = x[ErrParseUnsupportedCallWithStar-281] - _ = x[ErrParseNonUnaryAgregateFunctionCall-282] - _ = x[ErrParseMalformedJoin-283] - _ = x[ErrParseExpectedIdentForAt-284] - _ = x[ErrParseAsteriskIsNotAloneInSelectList-285] - _ = x[ErrParseCannotMixSqbAndWildcardInSelectList-286] - _ = x[ErrParseInvalidContextForWildcardInSelectList-287] - _ = x[ErrIncorrectSQLFunctionArgumentType-288] - _ = x[ErrValueParseFailure-289] - _ = x[ErrEvaluatorInvalidArguments-290] - _ = x[ErrIntegerOverflow-291] - _ = x[ErrLikeInvalidInputs-292] - _ = x[ErrCastFailed-293] - _ = x[ErrInvalidCast-294] - _ = x[ErrEvaluatorInvalidTimestampFormatPattern-295] - _ = x[ErrEvaluatorInvalidTimestampFormatPatternSymbolForParsing-296] - _ = x[ErrEvaluatorTimestampFormatPatternDuplicateFields-297] - _ = x[ErrEvaluatorTimestampFormatPatternHourClockAmPmMismatch-298] - _ = x[ErrEvaluatorUnterminatedTimestampFormatPatternToken-299] - _ = x[ErrEvaluatorInvalidTimestampFormatPatternToken-300] - _ = x[ErrEvaluatorInvalidTimestampFormatPatternSymbol-301] - _ = x[ErrEvaluatorBindingDoesNotExist-302] - _ = x[ErrMissingHeaders-303] - _ = x[ErrInvalidColumnIndex-304] - _ = x[ErrAdminConfigNotificationTargetsFailed-305] - _ = x[ErrAdminProfilerNotEnabled-306] - _ = x[ErrInvalidDecompressedSize-307] - _ = x[ErrAddUserInvalidArgument-308] - _ = x[ErrAdminResourceInvalidArgument-309] - _ = x[ErrAdminAccountNotEligible-310] - _ = x[ErrAccountNotEligible-311] - _ = x[ErrAdminServiceAccountNotFound-312] - _ = x[ErrPostPolicyConditionInvalidFormat-313] - _ = x[ErrInvalidChecksum-314] - _ = x[ErrLambdaARNInvalid-315] - _ = x[ErrLambdaARNNotFound-316] - _ = x[apiErrCodeEnd-317] + _ = x[ErrMaxVersionsExceeded-113] + _ = x[ErrInvalidPrefixMarker-114] + _ = x[ErrBadRequest-115] + _ = x[ErrKeyTooLongError-116] + _ = x[ErrInvalidBucketObjectLockConfiguration-117] + _ = x[ErrObjectLockConfigurationNotFound-118] + _ = x[ErrObjectLockConfigurationNotAllowed-119] + _ = x[ErrNoSuchObjectLockConfiguration-120] + _ = x[ErrObjectLocked-121] + _ = x[ErrInvalidRetentionDate-122] + _ = x[ErrPastObjectLockRetainDate-123] + _ = x[ErrUnknownWORMModeDirective-124] + _ = x[ErrBucketTaggingNotFound-125] + _ = x[ErrObjectLockInvalidHeaders-126] + _ = x[ErrInvalidTagDirective-127] + _ = x[ErrPolicyAlreadyAttached-128] + _ = x[ErrPolicyNotAttached-129] + _ = x[ErrExcessData-130] + _ = x[ErrInvalidEncryptionMethod-131] + _ = x[ErrInvalidEncryptionKeyID-132] + _ = x[ErrInsecureSSECustomerRequest-133] + _ = x[ErrSSEMultipartEncrypted-134] + _ = x[ErrSSEEncryptedObject-135] + _ = x[ErrInvalidEncryptionParameters-136] + _ = x[ErrInvalidEncryptionParametersSSEC-137] + _ = x[ErrInvalidSSECustomerAlgorithm-138] + _ = x[ErrInvalidSSECustomerKey-139] + _ = x[ErrMissingSSECustomerKey-140] + _ = x[ErrMissingSSECustomerKeyMD5-141] + _ = x[ErrSSECustomerKeyMD5Mismatch-142] + _ = x[ErrInvalidSSECustomerParameters-143] + _ = x[ErrIncompatibleEncryptionMethod-144] + _ = x[ErrKMSNotConfigured-145] + _ = x[ErrKMSKeyNotFoundException-146] + _ = x[ErrKMSDefaultKeyAlreadyConfigured-147] + _ = x[ErrNoAccessKey-148] + _ = x[ErrInvalidToken-149] + _ = x[ErrEventNotification-150] + _ = x[ErrARNNotification-151] + _ = x[ErrRegionNotification-152] + _ = x[ErrOverlappingFilterNotification-153] + _ = x[ErrFilterNameInvalid-154] + _ = x[ErrFilterNamePrefix-155] + _ = x[ErrFilterNameSuffix-156] + _ = x[ErrFilterValueInvalid-157] + _ = x[ErrOverlappingConfigs-158] + _ = x[ErrUnsupportedNotification-159] + _ = x[ErrContentSHA256Mismatch-160] + _ = x[ErrContentChecksumMismatch-161] + _ = x[ErrStorageFull-162] + _ = x[ErrRequestBodyParse-163] + _ = x[ErrObjectExistsAsDirectory-164] + _ = x[ErrInvalidObjectName-165] + _ = x[ErrInvalidObjectNamePrefixSlash-166] + _ = x[ErrInvalidResourceName-167] + _ = x[ErrInvalidLifecycleQueryParameter-168] + _ = x[ErrServerNotInitialized-169] + _ = x[ErrRequestTimedout-170] + _ = x[ErrClientDisconnected-171] + _ = x[ErrTooManyRequests-172] + _ = x[ErrInvalidRequest-173] + _ = x[ErrTransitionStorageClassNotFoundError-174] + _ = x[ErrInvalidStorageClass-175] + _ = x[ErrBackendDown-176] + _ = x[ErrMalformedJSON-177] + _ = x[ErrAdminNoSuchUser-178] + _ = x[ErrAdminNoSuchUserLDAPWarn-179] + _ = x[ErrAdminNoSuchGroup-180] + _ = x[ErrAdminGroupNotEmpty-181] + _ = x[ErrAdminGroupDisabled-182] + _ = x[ErrAdminNoSuchJob-183] + _ = x[ErrAdminNoSuchPolicy-184] + _ = x[ErrAdminPolicyChangeAlreadyApplied-185] + _ = x[ErrAdminInvalidArgument-186] + _ = x[ErrAdminInvalidAccessKey-187] + _ = x[ErrAdminInvalidSecretKey-188] + _ = x[ErrAdminConfigNoQuorum-189] + _ = x[ErrAdminConfigTooLarge-190] + _ = x[ErrAdminConfigBadJSON-191] + _ = x[ErrAdminNoSuchConfigTarget-192] + _ = x[ErrAdminConfigEnvOverridden-193] + _ = x[ErrAdminConfigDuplicateKeys-194] + _ = x[ErrAdminConfigInvalidIDPType-195] + _ = x[ErrAdminConfigLDAPNonDefaultConfigName-196] + _ = x[ErrAdminConfigLDAPValidation-197] + _ = x[ErrAdminConfigIDPCfgNameAlreadyExists-198] + _ = x[ErrAdminConfigIDPCfgNameDoesNotExist-199] + _ = x[ErrAdminCredentialsMismatch-200] + _ = x[ErrInsecureClientRequest-201] + _ = x[ErrObjectTampered-202] + _ = x[ErrSiteReplicationInvalidRequest-203] + _ = x[ErrSiteReplicationPeerResp-204] + _ = x[ErrSiteReplicationBackendIssue-205] + _ = x[ErrSiteReplicationServiceAccountError-206] + _ = x[ErrSiteReplicationBucketConfigError-207] + _ = x[ErrSiteReplicationBucketMetaError-208] + _ = x[ErrSiteReplicationIAMError-209] + _ = x[ErrSiteReplicationConfigMissing-210] + _ = x[ErrAdminRebalanceAlreadyStarted-211] + _ = x[ErrAdminRebalanceNotStarted-212] + _ = x[ErrAdminBucketQuotaExceeded-213] + _ = x[ErrAdminNoSuchQuotaConfiguration-214] + _ = x[ErrHealNotImplemented-215] + _ = x[ErrHealNoSuchProcess-216] + _ = x[ErrHealInvalidClientToken-217] + _ = x[ErrHealMissingBucket-218] + _ = x[ErrHealAlreadyRunning-219] + _ = x[ErrHealOverlappingPaths-220] + _ = x[ErrIncorrectContinuationToken-221] + _ = x[ErrEmptyRequestBody-222] + _ = x[ErrUnsupportedFunction-223] + _ = x[ErrInvalidExpressionType-224] + _ = x[ErrBusy-225] + _ = x[ErrUnauthorizedAccess-226] + _ = x[ErrExpressionTooLong-227] + _ = x[ErrIllegalSQLFunctionArgument-228] + _ = x[ErrInvalidKeyPath-229] + _ = x[ErrInvalidCompressionFormat-230] + _ = x[ErrInvalidFileHeaderInfo-231] + _ = x[ErrInvalidJSONType-232] + _ = x[ErrInvalidQuoteFields-233] + _ = x[ErrInvalidRequestParameter-234] + _ = x[ErrInvalidDataType-235] + _ = x[ErrInvalidTextEncoding-236] + _ = x[ErrInvalidDataSource-237] + _ = x[ErrInvalidTableAlias-238] + _ = x[ErrMissingRequiredParameter-239] + _ = x[ErrObjectSerializationConflict-240] + _ = x[ErrUnsupportedSQLOperation-241] + _ = x[ErrUnsupportedSQLStructure-242] + _ = x[ErrUnsupportedSyntax-243] + _ = x[ErrUnsupportedRangeHeader-244] + _ = x[ErrLexerInvalidChar-245] + _ = x[ErrLexerInvalidOperator-246] + _ = x[ErrLexerInvalidLiteral-247] + _ = x[ErrLexerInvalidIONLiteral-248] + _ = x[ErrParseExpectedDatePart-249] + _ = x[ErrParseExpectedKeyword-250] + _ = x[ErrParseExpectedTokenType-251] + _ = x[ErrParseExpected2TokenTypes-252] + _ = x[ErrParseExpectedNumber-253] + _ = x[ErrParseExpectedRightParenBuiltinFunctionCall-254] + _ = x[ErrParseExpectedTypeName-255] + _ = x[ErrParseExpectedWhenClause-256] + _ = x[ErrParseUnsupportedToken-257] + _ = x[ErrParseUnsupportedLiteralsGroupBy-258] + _ = x[ErrParseExpectedMember-259] + _ = x[ErrParseUnsupportedSelect-260] + _ = x[ErrParseUnsupportedCase-261] + _ = x[ErrParseUnsupportedCaseClause-262] + _ = x[ErrParseUnsupportedAlias-263] + _ = x[ErrParseUnsupportedSyntax-264] + _ = x[ErrParseUnknownOperator-265] + _ = x[ErrParseMissingIdentAfterAt-266] + _ = x[ErrParseUnexpectedOperator-267] + _ = x[ErrParseUnexpectedTerm-268] + _ = x[ErrParseUnexpectedToken-269] + _ = x[ErrParseUnexpectedKeyword-270] + _ = x[ErrParseExpectedExpression-271] + _ = x[ErrParseExpectedLeftParenAfterCast-272] + _ = x[ErrParseExpectedLeftParenValueConstructor-273] + _ = x[ErrParseExpectedLeftParenBuiltinFunctionCall-274] + _ = x[ErrParseExpectedArgumentDelimiter-275] + _ = x[ErrParseCastArity-276] + _ = x[ErrParseInvalidTypeParam-277] + _ = x[ErrParseEmptySelect-278] + _ = x[ErrParseSelectMissingFrom-279] + _ = x[ErrParseExpectedIdentForGroupName-280] + _ = x[ErrParseExpectedIdentForAlias-281] + _ = x[ErrParseUnsupportedCallWithStar-282] + _ = x[ErrParseNonUnaryAgregateFunctionCall-283] + _ = x[ErrParseMalformedJoin-284] + _ = x[ErrParseExpectedIdentForAt-285] + _ = x[ErrParseAsteriskIsNotAloneInSelectList-286] + _ = x[ErrParseCannotMixSqbAndWildcardInSelectList-287] + _ = x[ErrParseInvalidContextForWildcardInSelectList-288] + _ = x[ErrIncorrectSQLFunctionArgumentType-289] + _ = x[ErrValueParseFailure-290] + _ = x[ErrEvaluatorInvalidArguments-291] + _ = x[ErrIntegerOverflow-292] + _ = x[ErrLikeInvalidInputs-293] + _ = x[ErrCastFailed-294] + _ = x[ErrInvalidCast-295] + _ = x[ErrEvaluatorInvalidTimestampFormatPattern-296] + _ = x[ErrEvaluatorInvalidTimestampFormatPatternSymbolForParsing-297] + _ = x[ErrEvaluatorTimestampFormatPatternDuplicateFields-298] + _ = x[ErrEvaluatorTimestampFormatPatternHourClockAmPmMismatch-299] + _ = x[ErrEvaluatorUnterminatedTimestampFormatPatternToken-300] + _ = x[ErrEvaluatorInvalidTimestampFormatPatternToken-301] + _ = x[ErrEvaluatorInvalidTimestampFormatPatternSymbol-302] + _ = x[ErrEvaluatorBindingDoesNotExist-303] + _ = x[ErrMissingHeaders-304] + _ = x[ErrInvalidColumnIndex-305] + _ = x[ErrAdminConfigNotificationTargetsFailed-306] + _ = x[ErrAdminProfilerNotEnabled-307] + _ = x[ErrInvalidDecompressedSize-308] + _ = x[ErrAddUserInvalidArgument-309] + _ = x[ErrAdminResourceInvalidArgument-310] + _ = x[ErrAdminAccountNotEligible-311] + _ = x[ErrAccountNotEligible-312] + _ = x[ErrAdminServiceAccountNotFound-313] + _ = x[ErrPostPolicyConditionInvalidFormat-314] + _ = x[ErrInvalidChecksum-315] + _ = x[ErrLambdaARNInvalid-316] + _ = x[ErrLambdaARNNotFound-317] + _ = x[apiErrCodeEnd-318] } -const _APIErrorCode_name = "NoneAccessDeniedBadDigestEntityTooSmallEntityTooLargePolicyTooLargeIncompleteBodyInternalErrorInvalidAccessKeyIDAccessKeyDisabledInvalidArgumentInvalidBucketNameInvalidDigestInvalidRangeInvalidRangePartNumberInvalidCopyPartRangeInvalidCopyPartRangeSourceInvalidMaxKeysInvalidEncodingMethodInvalidMaxUploadsInvalidMaxPartsInvalidPartNumberMarkerInvalidPartNumberInvalidRequestBodyInvalidCopySourceInvalidMetadataDirectiveInvalidCopyDestInvalidPolicyDocumentInvalidObjectStateMalformedXMLMissingContentLengthMissingContentMD5MissingRequestBodyErrorMissingSecurityHeaderNoSuchBucketNoSuchBucketPolicyNoSuchBucketLifecycleNoSuchLifecycleConfigurationInvalidLifecycleWithObjectLockNoSuchBucketSSEConfigNoSuchCORSConfigurationNoSuchWebsiteConfigurationReplicationConfigurationNotFoundErrorRemoteDestinationNotFoundErrorReplicationDestinationMissingLockRemoteTargetNotFoundErrorReplicationRemoteConnectionErrorReplicationBandwidthLimitErrorBucketRemoteIdenticalToSourceBucketRemoteAlreadyExistsBucketRemoteLabelInUseBucketRemoteArnTypeInvalidBucketRemoteArnInvalidBucketRemoteRemoveDisallowedRemoteTargetNotVersionedErrorReplicationSourceNotVersionedErrorReplicationNeedsVersioningErrorReplicationBucketNeedsVersioningErrorReplicationDenyEditErrorRemoteTargetDenyAddErrorReplicationNoExistingObjectsReplicationValidationErrorReplicationPermissionCheckErrorObjectRestoreAlreadyInProgressNoSuchKeyNoSuchUploadInvalidVersionIDNoSuchVersionNotImplementedPreconditionFailedRequestTimeTooSkewedSignatureDoesNotMatchMethodNotAllowedInvalidPartInvalidPartOrderMissingPartAuthorizationHeaderMalformedMalformedPOSTRequestPOSTFileRequiredSignatureVersionNotSupportedBucketNotEmptyAllAccessDisabledPolicyInvalidVersionMissingFieldsMissingCredTagCredMalformedInvalidRegionInvalidServiceS3InvalidServiceSTSInvalidRequestVersionMissingSignTagMissingSignHeadersTagMalformedDateMalformedPresignedDateMalformedCredentialDateMalformedExpiresNegativeExpiresAuthHeaderEmptyExpiredPresignRequestRequestNotReadyYetUnsignedHeadersMissingDateHeaderInvalidQuerySignatureAlgoInvalidQueryParamsBucketAlreadyOwnedByYouInvalidDurationBucketAlreadyExistsMetadataTooLargeUnsupportedMetadataUnsupportedHostHeaderMaximumExpiresSlowDownReadSlowDownWriteInvalidPrefixMarkerBadRequestKeyTooLongErrorInvalidBucketObjectLockConfigurationObjectLockConfigurationNotFoundObjectLockConfigurationNotAllowedNoSuchObjectLockConfigurationObjectLockedInvalidRetentionDatePastObjectLockRetainDateUnknownWORMModeDirectiveBucketTaggingNotFoundObjectLockInvalidHeadersInvalidTagDirectivePolicyAlreadyAttachedPolicyNotAttachedExcessDataInvalidEncryptionMethodInvalidEncryptionKeyIDInsecureSSECustomerRequestSSEMultipartEncryptedSSEEncryptedObjectInvalidEncryptionParametersInvalidEncryptionParametersSSECInvalidSSECustomerAlgorithmInvalidSSECustomerKeyMissingSSECustomerKeyMissingSSECustomerKeyMD5SSECustomerKeyMD5MismatchInvalidSSECustomerParametersIncompatibleEncryptionMethodKMSNotConfiguredKMSKeyNotFoundExceptionKMSDefaultKeyAlreadyConfiguredNoAccessKeyInvalidTokenEventNotificationARNNotificationRegionNotificationOverlappingFilterNotificationFilterNameInvalidFilterNamePrefixFilterNameSuffixFilterValueInvalidOverlappingConfigsUnsupportedNotificationContentSHA256MismatchContentChecksumMismatchStorageFullRequestBodyParseObjectExistsAsDirectoryInvalidObjectNameInvalidObjectNamePrefixSlashInvalidResourceNameInvalidLifecycleQueryParameterServerNotInitializedRequestTimedoutClientDisconnectedTooManyRequestsInvalidRequestTransitionStorageClassNotFoundErrorInvalidStorageClassBackendDownMalformedJSONAdminNoSuchUserAdminNoSuchUserLDAPWarnAdminNoSuchGroupAdminGroupNotEmptyAdminGroupDisabledAdminNoSuchJobAdminNoSuchPolicyAdminPolicyChangeAlreadyAppliedAdminInvalidArgumentAdminInvalidAccessKeyAdminInvalidSecretKeyAdminConfigNoQuorumAdminConfigTooLargeAdminConfigBadJSONAdminNoSuchConfigTargetAdminConfigEnvOverriddenAdminConfigDuplicateKeysAdminConfigInvalidIDPTypeAdminConfigLDAPNonDefaultConfigNameAdminConfigLDAPValidationAdminConfigIDPCfgNameAlreadyExistsAdminConfigIDPCfgNameDoesNotExistAdminCredentialsMismatchInsecureClientRequestObjectTamperedSiteReplicationInvalidRequestSiteReplicationPeerRespSiteReplicationBackendIssueSiteReplicationServiceAccountErrorSiteReplicationBucketConfigErrorSiteReplicationBucketMetaErrorSiteReplicationIAMErrorSiteReplicationConfigMissingAdminRebalanceAlreadyStartedAdminRebalanceNotStartedAdminBucketQuotaExceededAdminNoSuchQuotaConfigurationHealNotImplementedHealNoSuchProcessHealInvalidClientTokenHealMissingBucketHealAlreadyRunningHealOverlappingPathsIncorrectContinuationTokenEmptyRequestBodyUnsupportedFunctionInvalidExpressionTypeBusyUnauthorizedAccessExpressionTooLongIllegalSQLFunctionArgumentInvalidKeyPathInvalidCompressionFormatInvalidFileHeaderInfoInvalidJSONTypeInvalidQuoteFieldsInvalidRequestParameterInvalidDataTypeInvalidTextEncodingInvalidDataSourceInvalidTableAliasMissingRequiredParameterObjectSerializationConflictUnsupportedSQLOperationUnsupportedSQLStructureUnsupportedSyntaxUnsupportedRangeHeaderLexerInvalidCharLexerInvalidOperatorLexerInvalidLiteralLexerInvalidIONLiteralParseExpectedDatePartParseExpectedKeywordParseExpectedTokenTypeParseExpected2TokenTypesParseExpectedNumberParseExpectedRightParenBuiltinFunctionCallParseExpectedTypeNameParseExpectedWhenClauseParseUnsupportedTokenParseUnsupportedLiteralsGroupByParseExpectedMemberParseUnsupportedSelectParseUnsupportedCaseParseUnsupportedCaseClauseParseUnsupportedAliasParseUnsupportedSyntaxParseUnknownOperatorParseMissingIdentAfterAtParseUnexpectedOperatorParseUnexpectedTermParseUnexpectedTokenParseUnexpectedKeywordParseExpectedExpressionParseExpectedLeftParenAfterCastParseExpectedLeftParenValueConstructorParseExpectedLeftParenBuiltinFunctionCallParseExpectedArgumentDelimiterParseCastArityParseInvalidTypeParamParseEmptySelectParseSelectMissingFromParseExpectedIdentForGroupNameParseExpectedIdentForAliasParseUnsupportedCallWithStarParseNonUnaryAgregateFunctionCallParseMalformedJoinParseExpectedIdentForAtParseAsteriskIsNotAloneInSelectListParseCannotMixSqbAndWildcardInSelectListParseInvalidContextForWildcardInSelectListIncorrectSQLFunctionArgumentTypeValueParseFailureEvaluatorInvalidArgumentsIntegerOverflowLikeInvalidInputsCastFailedInvalidCastEvaluatorInvalidTimestampFormatPatternEvaluatorInvalidTimestampFormatPatternSymbolForParsingEvaluatorTimestampFormatPatternDuplicateFieldsEvaluatorTimestampFormatPatternHourClockAmPmMismatchEvaluatorUnterminatedTimestampFormatPatternTokenEvaluatorInvalidTimestampFormatPatternTokenEvaluatorInvalidTimestampFormatPatternSymbolEvaluatorBindingDoesNotExistMissingHeadersInvalidColumnIndexAdminConfigNotificationTargetsFailedAdminProfilerNotEnabledInvalidDecompressedSizeAddUserInvalidArgumentAdminResourceInvalidArgumentAdminAccountNotEligibleAccountNotEligibleAdminServiceAccountNotFoundPostPolicyConditionInvalidFormatInvalidChecksumLambdaARNInvalidLambdaARNNotFoundapiErrCodeEnd" +const _APIErrorCode_name = "NoneAccessDeniedBadDigestEntityTooSmallEntityTooLargePolicyTooLargeIncompleteBodyInternalErrorInvalidAccessKeyIDAccessKeyDisabledInvalidArgumentInvalidBucketNameInvalidDigestInvalidRangeInvalidRangePartNumberInvalidCopyPartRangeInvalidCopyPartRangeSourceInvalidMaxKeysInvalidEncodingMethodInvalidMaxUploadsInvalidMaxPartsInvalidPartNumberMarkerInvalidPartNumberInvalidRequestBodyInvalidCopySourceInvalidMetadataDirectiveInvalidCopyDestInvalidPolicyDocumentInvalidObjectStateMalformedXMLMissingContentLengthMissingContentMD5MissingRequestBodyErrorMissingSecurityHeaderNoSuchBucketNoSuchBucketPolicyNoSuchBucketLifecycleNoSuchLifecycleConfigurationInvalidLifecycleWithObjectLockNoSuchBucketSSEConfigNoSuchCORSConfigurationNoSuchWebsiteConfigurationReplicationConfigurationNotFoundErrorRemoteDestinationNotFoundErrorReplicationDestinationMissingLockRemoteTargetNotFoundErrorReplicationRemoteConnectionErrorReplicationBandwidthLimitErrorBucketRemoteIdenticalToSourceBucketRemoteAlreadyExistsBucketRemoteLabelInUseBucketRemoteArnTypeInvalidBucketRemoteArnInvalidBucketRemoteRemoveDisallowedRemoteTargetNotVersionedErrorReplicationSourceNotVersionedErrorReplicationNeedsVersioningErrorReplicationBucketNeedsVersioningErrorReplicationDenyEditErrorRemoteTargetDenyAddErrorReplicationNoExistingObjectsReplicationValidationErrorReplicationPermissionCheckErrorObjectRestoreAlreadyInProgressNoSuchKeyNoSuchUploadInvalidVersionIDNoSuchVersionNotImplementedPreconditionFailedRequestTimeTooSkewedSignatureDoesNotMatchMethodNotAllowedInvalidPartInvalidPartOrderMissingPartAuthorizationHeaderMalformedMalformedPOSTRequestPOSTFileRequiredSignatureVersionNotSupportedBucketNotEmptyAllAccessDisabledPolicyInvalidVersionMissingFieldsMissingCredTagCredMalformedInvalidRegionInvalidServiceS3InvalidServiceSTSInvalidRequestVersionMissingSignTagMissingSignHeadersTagMalformedDateMalformedPresignedDateMalformedCredentialDateMalformedExpiresNegativeExpiresAuthHeaderEmptyExpiredPresignRequestRequestNotReadyYetUnsignedHeadersMissingDateHeaderInvalidQuerySignatureAlgoInvalidQueryParamsBucketAlreadyOwnedByYouInvalidDurationBucketAlreadyExistsMetadataTooLargeUnsupportedMetadataUnsupportedHostHeaderMaximumExpiresSlowDownReadSlowDownWriteMaxVersionsExceededInvalidPrefixMarkerBadRequestKeyTooLongErrorInvalidBucketObjectLockConfigurationObjectLockConfigurationNotFoundObjectLockConfigurationNotAllowedNoSuchObjectLockConfigurationObjectLockedInvalidRetentionDatePastObjectLockRetainDateUnknownWORMModeDirectiveBucketTaggingNotFoundObjectLockInvalidHeadersInvalidTagDirectivePolicyAlreadyAttachedPolicyNotAttachedExcessDataInvalidEncryptionMethodInvalidEncryptionKeyIDInsecureSSECustomerRequestSSEMultipartEncryptedSSEEncryptedObjectInvalidEncryptionParametersInvalidEncryptionParametersSSECInvalidSSECustomerAlgorithmInvalidSSECustomerKeyMissingSSECustomerKeyMissingSSECustomerKeyMD5SSECustomerKeyMD5MismatchInvalidSSECustomerParametersIncompatibleEncryptionMethodKMSNotConfiguredKMSKeyNotFoundExceptionKMSDefaultKeyAlreadyConfiguredNoAccessKeyInvalidTokenEventNotificationARNNotificationRegionNotificationOverlappingFilterNotificationFilterNameInvalidFilterNamePrefixFilterNameSuffixFilterValueInvalidOverlappingConfigsUnsupportedNotificationContentSHA256MismatchContentChecksumMismatchStorageFullRequestBodyParseObjectExistsAsDirectoryInvalidObjectNameInvalidObjectNamePrefixSlashInvalidResourceNameInvalidLifecycleQueryParameterServerNotInitializedRequestTimedoutClientDisconnectedTooManyRequestsInvalidRequestTransitionStorageClassNotFoundErrorInvalidStorageClassBackendDownMalformedJSONAdminNoSuchUserAdminNoSuchUserLDAPWarnAdminNoSuchGroupAdminGroupNotEmptyAdminGroupDisabledAdminNoSuchJobAdminNoSuchPolicyAdminPolicyChangeAlreadyAppliedAdminInvalidArgumentAdminInvalidAccessKeyAdminInvalidSecretKeyAdminConfigNoQuorumAdminConfigTooLargeAdminConfigBadJSONAdminNoSuchConfigTargetAdminConfigEnvOverriddenAdminConfigDuplicateKeysAdminConfigInvalidIDPTypeAdminConfigLDAPNonDefaultConfigNameAdminConfigLDAPValidationAdminConfigIDPCfgNameAlreadyExistsAdminConfigIDPCfgNameDoesNotExistAdminCredentialsMismatchInsecureClientRequestObjectTamperedSiteReplicationInvalidRequestSiteReplicationPeerRespSiteReplicationBackendIssueSiteReplicationServiceAccountErrorSiteReplicationBucketConfigErrorSiteReplicationBucketMetaErrorSiteReplicationIAMErrorSiteReplicationConfigMissingAdminRebalanceAlreadyStartedAdminRebalanceNotStartedAdminBucketQuotaExceededAdminNoSuchQuotaConfigurationHealNotImplementedHealNoSuchProcessHealInvalidClientTokenHealMissingBucketHealAlreadyRunningHealOverlappingPathsIncorrectContinuationTokenEmptyRequestBodyUnsupportedFunctionInvalidExpressionTypeBusyUnauthorizedAccessExpressionTooLongIllegalSQLFunctionArgumentInvalidKeyPathInvalidCompressionFormatInvalidFileHeaderInfoInvalidJSONTypeInvalidQuoteFieldsInvalidRequestParameterInvalidDataTypeInvalidTextEncodingInvalidDataSourceInvalidTableAliasMissingRequiredParameterObjectSerializationConflictUnsupportedSQLOperationUnsupportedSQLStructureUnsupportedSyntaxUnsupportedRangeHeaderLexerInvalidCharLexerInvalidOperatorLexerInvalidLiteralLexerInvalidIONLiteralParseExpectedDatePartParseExpectedKeywordParseExpectedTokenTypeParseExpected2TokenTypesParseExpectedNumberParseExpectedRightParenBuiltinFunctionCallParseExpectedTypeNameParseExpectedWhenClauseParseUnsupportedTokenParseUnsupportedLiteralsGroupByParseExpectedMemberParseUnsupportedSelectParseUnsupportedCaseParseUnsupportedCaseClauseParseUnsupportedAliasParseUnsupportedSyntaxParseUnknownOperatorParseMissingIdentAfterAtParseUnexpectedOperatorParseUnexpectedTermParseUnexpectedTokenParseUnexpectedKeywordParseExpectedExpressionParseExpectedLeftParenAfterCastParseExpectedLeftParenValueConstructorParseExpectedLeftParenBuiltinFunctionCallParseExpectedArgumentDelimiterParseCastArityParseInvalidTypeParamParseEmptySelectParseSelectMissingFromParseExpectedIdentForGroupNameParseExpectedIdentForAliasParseUnsupportedCallWithStarParseNonUnaryAgregateFunctionCallParseMalformedJoinParseExpectedIdentForAtParseAsteriskIsNotAloneInSelectListParseCannotMixSqbAndWildcardInSelectListParseInvalidContextForWildcardInSelectListIncorrectSQLFunctionArgumentTypeValueParseFailureEvaluatorInvalidArgumentsIntegerOverflowLikeInvalidInputsCastFailedInvalidCastEvaluatorInvalidTimestampFormatPatternEvaluatorInvalidTimestampFormatPatternSymbolForParsingEvaluatorTimestampFormatPatternDuplicateFieldsEvaluatorTimestampFormatPatternHourClockAmPmMismatchEvaluatorUnterminatedTimestampFormatPatternTokenEvaluatorInvalidTimestampFormatPatternTokenEvaluatorInvalidTimestampFormatPatternSymbolEvaluatorBindingDoesNotExistMissingHeadersInvalidColumnIndexAdminConfigNotificationTargetsFailedAdminProfilerNotEnabledInvalidDecompressedSizeAddUserInvalidArgumentAdminResourceInvalidArgumentAdminAccountNotEligibleAccountNotEligibleAdminServiceAccountNotFoundPostPolicyConditionInvalidFormatInvalidChecksumLambdaARNInvalidLambdaARNNotFoundapiErrCodeEnd" -var _APIErrorCode_index = [...]uint16{0, 4, 16, 25, 39, 53, 67, 81, 94, 112, 129, 144, 161, 174, 186, 208, 228, 254, 268, 289, 306, 321, 344, 361, 379, 396, 420, 435, 456, 474, 486, 506, 523, 546, 567, 579, 597, 618, 646, 676, 697, 720, 746, 783, 813, 846, 871, 903, 933, 962, 987, 1009, 1035, 1057, 1085, 1114, 1148, 1179, 1216, 1240, 1264, 1292, 1318, 1349, 1379, 1388, 1400, 1416, 1429, 1443, 1461, 1481, 1502, 1518, 1529, 1545, 1556, 1584, 1604, 1620, 1648, 1662, 1679, 1699, 1712, 1726, 1739, 1752, 1768, 1785, 1806, 1820, 1841, 1854, 1876, 1899, 1915, 1930, 1945, 1966, 1984, 1999, 2016, 2041, 2059, 2082, 2097, 2116, 2132, 2151, 2172, 2186, 2198, 2211, 2230, 2240, 2255, 2291, 2322, 2355, 2384, 2396, 2416, 2440, 2464, 2485, 2509, 2528, 2549, 2566, 2576, 2599, 2621, 2647, 2668, 2686, 2713, 2744, 2771, 2792, 2813, 2837, 2862, 2890, 2918, 2934, 2957, 2987, 2998, 3010, 3027, 3042, 3060, 3089, 3106, 3122, 3138, 3156, 3174, 3197, 3218, 3241, 3252, 3268, 3291, 3308, 3336, 3355, 3385, 3405, 3420, 3438, 3453, 3467, 3502, 3521, 3532, 3545, 3560, 3583, 3599, 3617, 3635, 3649, 3666, 3697, 3717, 3738, 3759, 3778, 3797, 3815, 3838, 3862, 3886, 3911, 3946, 3971, 4005, 4038, 4062, 4083, 4097, 4126, 4149, 4176, 4210, 4242, 4272, 4295, 4323, 4351, 4375, 4399, 4428, 4446, 4463, 4485, 4502, 4520, 4540, 4566, 4582, 4601, 4622, 4626, 4644, 4661, 4687, 4701, 4725, 4746, 4761, 4779, 4802, 4817, 4836, 4853, 4870, 4894, 4921, 4944, 4967, 4984, 5006, 5022, 5042, 5061, 5083, 5104, 5124, 5146, 5170, 5189, 5231, 5252, 5275, 5296, 5327, 5346, 5368, 5388, 5414, 5435, 5457, 5477, 5501, 5524, 5543, 5563, 5585, 5608, 5639, 5677, 5718, 5748, 5762, 5783, 5799, 5821, 5851, 5877, 5905, 5938, 5956, 5979, 6014, 6054, 6096, 6128, 6145, 6170, 6185, 6202, 6212, 6223, 6261, 6315, 6361, 6413, 6461, 6504, 6548, 6576, 6590, 6608, 6644, 6667, 6690, 6712, 6740, 6763, 6781, 6808, 6840, 6855, 6871, 6888, 6901} +var _APIErrorCode_index = [...]uint16{0, 4, 16, 25, 39, 53, 67, 81, 94, 112, 129, 144, 161, 174, 186, 208, 228, 254, 268, 289, 306, 321, 344, 361, 379, 396, 420, 435, 456, 474, 486, 506, 523, 546, 567, 579, 597, 618, 646, 676, 697, 720, 746, 783, 813, 846, 871, 903, 933, 962, 987, 1009, 1035, 1057, 1085, 1114, 1148, 1179, 1216, 1240, 1264, 1292, 1318, 1349, 1379, 1388, 1400, 1416, 1429, 1443, 1461, 1481, 1502, 1518, 1529, 1545, 1556, 1584, 1604, 1620, 1648, 1662, 1679, 1699, 1712, 1726, 1739, 1752, 1768, 1785, 1806, 1820, 1841, 1854, 1876, 1899, 1915, 1930, 1945, 1966, 1984, 1999, 2016, 2041, 2059, 2082, 2097, 2116, 2132, 2151, 2172, 2186, 2198, 2211, 2230, 2249, 2259, 2274, 2310, 2341, 2374, 2403, 2415, 2435, 2459, 2483, 2504, 2528, 2547, 2568, 2585, 2595, 2618, 2640, 2666, 2687, 2705, 2732, 2763, 2790, 2811, 2832, 2856, 2881, 2909, 2937, 2953, 2976, 3006, 3017, 3029, 3046, 3061, 3079, 3108, 3125, 3141, 3157, 3175, 3193, 3216, 3237, 3260, 3271, 3287, 3310, 3327, 3355, 3374, 3404, 3424, 3439, 3457, 3472, 3486, 3521, 3540, 3551, 3564, 3579, 3602, 3618, 3636, 3654, 3668, 3685, 3716, 3736, 3757, 3778, 3797, 3816, 3834, 3857, 3881, 3905, 3930, 3965, 3990, 4024, 4057, 4081, 4102, 4116, 4145, 4168, 4195, 4229, 4261, 4291, 4314, 4342, 4370, 4394, 4418, 4447, 4465, 4482, 4504, 4521, 4539, 4559, 4585, 4601, 4620, 4641, 4645, 4663, 4680, 4706, 4720, 4744, 4765, 4780, 4798, 4821, 4836, 4855, 4872, 4889, 4913, 4940, 4963, 4986, 5003, 5025, 5041, 5061, 5080, 5102, 5123, 5143, 5165, 5189, 5208, 5250, 5271, 5294, 5315, 5346, 5365, 5387, 5407, 5433, 5454, 5476, 5496, 5520, 5543, 5562, 5582, 5604, 5627, 5658, 5696, 5737, 5767, 5781, 5802, 5818, 5840, 5870, 5896, 5924, 5957, 5975, 5998, 6033, 6073, 6115, 6147, 6164, 6189, 6204, 6221, 6231, 6242, 6280, 6334, 6380, 6432, 6480, 6523, 6567, 6595, 6609, 6627, 6663, 6686, 6709, 6731, 6759, 6782, 6800, 6827, 6859, 6874, 6890, 6907, 6920} func (i APIErrorCode) String() string { if i < 0 || i >= APIErrorCode(len(_APIErrorCode_index)-1) { diff --git a/cmd/storage-errors.go b/cmd/storage-errors.go index 06b56acd0..aa008b511 100644 --- a/cmd/storage-errors.go +++ b/cmd/storage-errors.go @@ -1,4 +1,4 @@ -// Copyright (c) 2015-2021 MinIO, Inc. +// Copyright (c) 2015-2023 MinIO, Inc. // // This file is part of MinIO Object Storage stack // @@ -24,6 +24,9 @@ import ( "github.com/minio/minio/internal/logger" ) +// errMaxVersionsExceeded return error beyond 10000 (default) versions per object +var errMaxVersionsExceeded = StorageErr("maximum versions exceeded, please delete few versions to proceed") + // errUnexpected - unexpected error, requires manual intervention. var errUnexpected = StorageErr("unexpected error, please report this issue at https://github.com/minio/minio/issues") diff --git a/cmd/xl-storage-format-v2.go b/cmd/xl-storage-format-v2.go index c3c2332fb..2c6b66c36 100644 --- a/cmd/xl-storage-format-v2.go +++ b/cmd/xl-storage-format-v2.go @@ -26,6 +26,7 @@ import ( "fmt" "io" "sort" + "strconv" "strings" "sync" "time" @@ -37,9 +38,31 @@ import ( "github.com/minio/minio/internal/bucket/replication" xhttp "github.com/minio/minio/internal/http" "github.com/minio/minio/internal/logger" + "github.com/minio/pkg/env" "github.com/tinylib/msgp/msgp" ) +// Reject creating new versions when a single object is cross maxObjectVersions +var maxObjectVersions = 10000 + +func init() { + v := env.Get("_MINIO_OBJECT_MAX_VERSIONS", "") + if v != "" { + maxv, err := strconv.Atoi(v) + if err != nil { + logger.Info("invalid _MINIO_OBJECT_MAX_VERSIONS value: %s, defaulting to '10000'", v) + maxObjectVersions = 10000 + } else { + if maxv < 10 { + logger.Info("invalid _MINIO_OBJECT_MAX_VERSIONS value: %s, minimum allowed is '10' defaulting to '10000'", v) + maxObjectVersions = 10000 + } else { + maxObjectVersions = maxv + } + } + } +} + var ( // XL header specifies the format xlHeader = [4]byte{'X', 'L', '2', ' '} @@ -1070,6 +1093,12 @@ func (x *xlMetaV2) addVersion(ver xlMetaV2Version) error { if err != nil { return err } + + // returns error if we have exceeded maxObjectVersions + if len(x.versions)+1 > maxObjectVersions { + return errMaxVersionsExceeded + } + // Add space at the end. // Will have -1 modtime, so it will be inserted there. x.versions = append(x.versions, xlMetaV2ShallowVersion{header: xlMetaV2VersionHeader{ModTime: -1}}) diff --git a/cmd/xl-storage.go b/cmd/xl-storage.go index 06567e1e2..20f88c69f 100644 --- a/cmd/xl-storage.go +++ b/cmd/xl-storage.go @@ -2211,6 +2211,7 @@ func (s *xlStorage) RenameData(ctx context.Context, srcVolume, srcPath string, f errFileVersionNotFound, errDiskNotFound, errUnformattedDisk, + errMaxVersionsExceeded, } if err != nil && !IsErr(err, ignoredErrs...) && !contextCanceled(ctx) { // Only log these errors if context is not yet canceled. diff --git a/docs/minio-limits.md b/docs/minio-limits.md index 4289fd934..a478250a7 100644 --- a/docs/minio-limits.md +++ b/docs/minio-limits.md @@ -17,21 +17,22 @@ For optimal production setup MinIO recommends Linux kernel version 4.x and later ## Limits of S3 API -| Item | Specification | -|:--------------------------------------------------------------------------------|:------------------------------------------------| -| Maximum number of buckets | unlimited (we recommend not beyond 500000 buckets) | -| Maximum number of objects per bucket | no-limit | -| Maximum object size | 50 TiB | -| Minimum object size | 0 B | -| Maximum object size per PUT operation | 5 TiB | -| Maximum number of parts per upload | 10,000 | -| Part size range | 5 MiB to 5 TiB. Last part can be 0 B to 5 TiB | -| Maximum number of parts returned per list parts request | 10000 | -| Maximum number of objects returned per list objects request | 1000 | -| Maximum number of multipart uploads returned per list multipart uploads request | 1000 | -| Maximum length for bucket names | 63 | -| Maximum length for object names | 1024 | -| Maximum length for '/' separated object name segment | 255 | +| Item | Specification | +|:--------------------------------------------------------------------------------|:--------------------------------------------------------------------------------| +| Maximum number of buckets | unlimited (we recommend not beyond 500000 buckets) | +| Maximum number of objects per bucket | no-limit | +| Maximum object size | 50 TiB | +| Minimum object size | 0 B | +| Maximum object size per PUT operation | 5 TiB | +| Maximum number of parts per upload | 10,000 | +| Part size range | 5 MiB to 5 TiB. Last part can be 0 B to 5 TiB | +| Maximum number of parts returned per list parts request | 10000 | +| Maximum number of objects returned per list objects request | 1000 | +| Maximum number of multipart uploads returned per list multipart uploads request | 1000 | +| Maximum length for bucket names | 63 | +| Maximum length for object names | 1024 | +| Maximum length for '/' separated object name segment | 255 | +| Maximum number of versions per object | 10000 (can be configured to higher values but we do not recommend beyond 10000) | ## List of Amazon S3 API's not supported on MinIO