From 1443b5927a83868f2888eb7b26abe70e6f773a94 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Sun, 18 Jun 2023 18:20:15 -0700 Subject: [PATCH] allow quorum fileInfo to pick same parityBlocks (#17454) Bonus: allow replication to proceed for 503 errors such as with error code SlowDownRead --- cmd/admin-handlers.go | 4 +- cmd/api-errors.go | 44 +-- cmd/api-errors_test.go | 4 +- cmd/api-response.go | 2 + cmd/apierrorcode_string.go | 417 ++++++++++++++-------------- cmd/background-newdisks-heal-ops.go | 6 +- cmd/bucket-handlers.go | 5 +- cmd/bucket-replication.go | 27 +- cmd/erasure-healing.go | 9 +- cmd/erasure-metadata.go | 1 + cmd/erasure-object.go | 22 +- cmd/handler-api.go | 2 +- cmd/listen-notification-handlers.go | 2 +- cmd/object-handlers.go | 10 +- cmd/storage-datatypes.go | 5 +- cmd/xl-storage-format-v1.go | 32 +++ cmd/xl-storage.go | 12 +- go.mod | 2 +- go.sum | 4 +- 19 files changed, 339 insertions(+), 271 deletions(-) diff --git a/cmd/admin-handlers.go b/cmd/admin-handlers.go index 506f5a0e6..b9295b1b3 100644 --- a/cmd/admin-handlers.go +++ b/cmd/admin-handlers.go @@ -1525,7 +1525,7 @@ func (a adminAPIHandlers) TraceHandler(w http.ResponseWriter, r *http.Request) { return shouldTrace(entry, traceOpts) }) if err != nil { - writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrSlowDown), r.URL) + writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL) return } @@ -1605,7 +1605,7 @@ func (a adminAPIHandlers) ConsoleLogHandler(w http.ResponseWriter, r *http.Reque err = globalConsoleSys.Subscribe(logCh, ctx.Done(), node, limitLines, logKind, nil) if err != nil { - writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrSlowDown), r.URL) + writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL) return } diff --git a/cmd/api-errors.go b/cmd/api-errors.go index ac5f56977..65fd70528 100644 --- a/cmd/api-errors.go +++ b/cmd/api-errors.go @@ -185,7 +185,8 @@ const ( ErrMetadataTooLarge ErrUnsupportedMetadata ErrMaximumExpires - ErrSlowDown + ErrSlowDownRead + ErrSlowDownWrite ErrInvalidPrefixMarker ErrBadRequest ErrKeyTooLongError @@ -257,9 +258,9 @@ const ( ErrInvalidResourceName ErrInvalidLifecycleQueryParameter ErrServerNotInitialized - ErrOperationTimedOut + ErrRequestTimedout ErrClientDisconnected - ErrOperationMaxedOut + ErrTooManyRequests ErrInvalidRequest ErrTransitionStorageClassNotFoundError // MinIO storage class error codes @@ -843,11 +844,16 @@ var errorCodes = errorCodeMap{ Description: "Request is not valid yet", HTTPStatusCode: http.StatusForbidden, }, - ErrSlowDown: { - Code: "SlowDown", + ErrSlowDownRead: { + Code: "SlowDownRead", Description: "Resource requested is unreadable, please reduce your request rate", HTTPStatusCode: http.StatusServiceUnavailable, }, + ErrSlowDownWrite: { + Code: "SlowDownWrite", + Description: "Resource requested is unwritable, please reduce your request rate", + HTTPStatusCode: http.StatusServiceUnavailable, + }, ErrInvalidPrefixMarker: { Code: "InvalidPrefixMarker", Description: "Invalid marker prefix combination", @@ -1416,7 +1422,7 @@ var errorCodes = errorCodeMap{ Description: "Cannot respond to plain-text request from TLS-encrypted server", HTTPStatusCode: http.StatusBadRequest, }, - ErrOperationTimedOut: { + ErrRequestTimedout: { Code: "RequestTimeout", Description: "A timeout occurred while trying to lock a resource, please reduce your request rate", HTTPStatusCode: http.StatusServiceUnavailable, @@ -1426,9 +1432,9 @@ var errorCodes = errorCodeMap{ Description: "Client disconnected before response was ready", HTTPStatusCode: 499, // No official code, use nginx value. }, - ErrOperationMaxedOut: { - Code: "SlowDown", - Description: "A timeout exceeded while waiting to proceed with the request, please reduce your request rate", + ErrTooManyRequests: { + Code: "TooManyRequests", + Description: "Deadline exceeded while waiting in incoming queue, please reduce your request rate", HTTPStatusCode: http.StatusServiceUnavailable, }, ErrUnsupportedMetadata: { @@ -2039,7 +2045,7 @@ func toAPIErrorCode(ctx context.Context, err error) (apiErr APIErrorCode) { } // Only return ErrClientDisconnected if the provided context is actually canceled. - // This way downstream context.Canceled will still report ErrOperationTimedOut + // This way downstream context.Canceled will still report ErrRequestTimedout if contextCanceled(ctx) && errors.Is(ctx.Err(), context.Canceled) { return ErrClientDisconnected } @@ -2083,9 +2089,9 @@ func toAPIErrorCode(ctx context.Context, err error) (apiErr APIErrorCode) { case errInvalidStorageClass: apiErr = ErrInvalidStorageClass case errErasureReadQuorum: - apiErr = ErrSlowDown + apiErr = ErrSlowDownRead case errErasureWriteQuorum: - apiErr = ErrSlowDown + apiErr = ErrSlowDownWrite // SSE errors case errInvalidEncryptionParameters: apiErr = ErrInvalidEncryptionParameters @@ -2119,10 +2125,10 @@ func toAPIErrorCode(ctx context.Context, err error) (apiErr APIErrorCode) { apiErr = ErrKMSKeyNotFoundException case errKMSDefaultKeyAlreadyConfigured: apiErr = ErrKMSDefaultKeyAlreadyConfigured - case context.Canceled, context.DeadlineExceeded: - apiErr = ErrOperationTimedOut - case errDiskNotFound: - apiErr = ErrSlowDown + case context.Canceled: + apiErr = ErrClientDisconnected + case context.DeadlineExceeded: + apiErr = ErrRequestTimedout case objectlock.ErrInvalidRetentionDate: apiErr = ErrInvalidRetentionDate case objectlock.ErrPastObjectLockRetainDate: @@ -2201,9 +2207,9 @@ func toAPIErrorCode(ctx context.Context, err error) (apiErr APIErrorCode) { case InvalidPart: apiErr = ErrInvalidPart case InsufficientWriteQuorum: - apiErr = ErrSlowDown + apiErr = ErrSlowDownWrite case InsufficientReadQuorum: - apiErr = ErrSlowDown + apiErr = ErrSlowDownRead case InvalidMarkerPrefixCombination: apiErr = ErrNotImplemented case InvalidUploadIDKeyCombination: @@ -2297,7 +2303,7 @@ func toAPIErrorCode(ctx context.Context, err error) (apiErr APIErrorCode) { case *event.ErrUnsupportedConfiguration: apiErr = ErrUnsupportedNotification case OperationTimedOut: - apiErr = ErrOperationTimedOut + apiErr = ErrRequestTimedout case BackendDown: apiErr = ErrBackendDown case ObjectNameTooLong: diff --git a/cmd/api-errors_test.go b/cmd/api-errors_test.go index 481852174..a0fae3f75 100644 --- a/cmd/api-errors_test.go +++ b/cmd/api-errors_test.go @@ -40,8 +40,8 @@ var toAPIErrorTests = []struct { {err: ObjectNameInvalid{}, errCode: ErrInvalidObjectName}, {err: InvalidUploadID{}, errCode: ErrNoSuchUpload}, {err: InvalidPart{}, errCode: ErrInvalidPart}, - {err: InsufficientReadQuorum{}, errCode: ErrSlowDown}, - {err: InsufficientWriteQuorum{}, errCode: ErrSlowDown}, + {err: InsufficientReadQuorum{}, errCode: ErrSlowDownRead}, + {err: InsufficientWriteQuorum{}, errCode: ErrSlowDownWrite}, {err: InvalidMarkerPrefixCombination{}, errCode: ErrNotImplemented}, {err: InvalidUploadIDKeyCombination{}, errCode: ErrNotImplemented}, {err: MalformedUploadID{}, errCode: ErrNoSuchUpload}, diff --git a/cmd/api-response.go b/cmd/api-response.go index 190fab8f4..0fc0f0b78 100644 --- a/cmd/api-response.go +++ b/cmd/api-response.go @@ -945,6 +945,8 @@ func writeErrorResponse(ctx context.Context, w http.ResponseWriter, err APIError } func writeErrorResponseHeadersOnly(w http.ResponseWriter, err APIError) { + w.Header().Set(xMinIOErrCodeHeader, err.Code) + w.Header().Set(xMinIOErrDescHeader, "\""+err.Description+"\"") writeResponse(w, err.HTTPStatusCode, nil, mimeNone) } diff --git a/cmd/apierrorcode_string.go b/cmd/apierrorcode_string.go index 25824e74b..ae4b338a7 100644 --- a/cmd/apierrorcode_string.go +++ b/cmd/apierrorcode_string.go @@ -116,217 +116,218 @@ func _() { _ = x[ErrMetadataTooLarge-105] _ = x[ErrUnsupportedMetadata-106] _ = x[ErrMaximumExpires-107] - _ = x[ErrSlowDown-108] - _ = x[ErrInvalidPrefixMarker-109] - _ = x[ErrBadRequest-110] - _ = x[ErrKeyTooLongError-111] - _ = x[ErrInvalidBucketObjectLockConfiguration-112] - _ = x[ErrObjectLockConfigurationNotFound-113] - _ = x[ErrObjectLockConfigurationNotAllowed-114] - _ = x[ErrNoSuchObjectLockConfiguration-115] - _ = x[ErrObjectLocked-116] - _ = x[ErrInvalidRetentionDate-117] - _ = x[ErrPastObjectLockRetainDate-118] - _ = x[ErrUnknownWORMModeDirective-119] - _ = x[ErrBucketTaggingNotFound-120] - _ = x[ErrObjectLockInvalidHeaders-121] - _ = x[ErrInvalidTagDirective-122] - _ = x[ErrPolicyAlreadyAttached-123] - _ = x[ErrPolicyNotAttached-124] - _ = x[ErrExcessData-125] - _ = x[ErrInvalidEncryptionMethod-126] - _ = x[ErrInvalidEncryptionKeyID-127] - _ = x[ErrInsecureSSECustomerRequest-128] - _ = x[ErrSSEMultipartEncrypted-129] - _ = x[ErrSSEEncryptedObject-130] - _ = x[ErrInvalidEncryptionParameters-131] - _ = x[ErrInvalidEncryptionParametersSSEC-132] - _ = x[ErrInvalidSSECustomerAlgorithm-133] - _ = x[ErrInvalidSSECustomerKey-134] - _ = x[ErrMissingSSECustomerKey-135] - _ = x[ErrMissingSSECustomerKeyMD5-136] - _ = x[ErrSSECustomerKeyMD5Mismatch-137] - _ = x[ErrInvalidSSECustomerParameters-138] - _ = x[ErrIncompatibleEncryptionMethod-139] - _ = x[ErrKMSNotConfigured-140] - _ = x[ErrKMSKeyNotFoundException-141] - _ = x[ErrKMSDefaultKeyAlreadyConfigured-142] - _ = x[ErrNoAccessKey-143] - _ = x[ErrInvalidToken-144] - _ = x[ErrEventNotification-145] - _ = x[ErrARNNotification-146] - _ = x[ErrRegionNotification-147] - _ = x[ErrOverlappingFilterNotification-148] - _ = x[ErrFilterNameInvalid-149] - _ = x[ErrFilterNamePrefix-150] - _ = x[ErrFilterNameSuffix-151] - _ = x[ErrFilterValueInvalid-152] - _ = x[ErrOverlappingConfigs-153] - _ = x[ErrUnsupportedNotification-154] - _ = x[ErrContentSHA256Mismatch-155] - _ = x[ErrContentChecksumMismatch-156] - _ = x[ErrStorageFull-157] - _ = x[ErrRequestBodyParse-158] - _ = x[ErrObjectExistsAsDirectory-159] - _ = x[ErrInvalidObjectName-160] - _ = x[ErrInvalidObjectNamePrefixSlash-161] - _ = x[ErrInvalidResourceName-162] - _ = x[ErrInvalidLifecycleQueryParameter-163] - _ = x[ErrServerNotInitialized-164] - _ = x[ErrOperationTimedOut-165] - _ = x[ErrClientDisconnected-166] - _ = x[ErrOperationMaxedOut-167] - _ = x[ErrInvalidRequest-168] - _ = x[ErrTransitionStorageClassNotFoundError-169] - _ = x[ErrInvalidStorageClass-170] - _ = x[ErrBackendDown-171] - _ = x[ErrMalformedJSON-172] - _ = x[ErrAdminNoSuchUser-173] - _ = x[ErrAdminNoSuchUserLDAPWarn-174] - _ = x[ErrAdminNoSuchGroup-175] - _ = x[ErrAdminGroupNotEmpty-176] - _ = x[ErrAdminGroupDisabled-177] - _ = x[ErrAdminNoSuchJob-178] - _ = x[ErrAdminNoSuchPolicy-179] - _ = x[ErrAdminPolicyChangeAlreadyApplied-180] - _ = x[ErrAdminInvalidArgument-181] - _ = x[ErrAdminInvalidAccessKey-182] - _ = x[ErrAdminInvalidSecretKey-183] - _ = x[ErrAdminConfigNoQuorum-184] - _ = x[ErrAdminConfigTooLarge-185] - _ = x[ErrAdminConfigBadJSON-186] - _ = x[ErrAdminNoSuchConfigTarget-187] - _ = x[ErrAdminConfigEnvOverridden-188] - _ = x[ErrAdminConfigDuplicateKeys-189] - _ = x[ErrAdminConfigInvalidIDPType-190] - _ = x[ErrAdminConfigLDAPNonDefaultConfigName-191] - _ = x[ErrAdminConfigLDAPValidation-192] - _ = x[ErrAdminConfigIDPCfgNameAlreadyExists-193] - _ = x[ErrAdminConfigIDPCfgNameDoesNotExist-194] - _ = x[ErrAdminCredentialsMismatch-195] - _ = x[ErrInsecureClientRequest-196] - _ = x[ErrObjectTampered-197] - _ = x[ErrSiteReplicationInvalidRequest-198] - _ = x[ErrSiteReplicationPeerResp-199] - _ = x[ErrSiteReplicationBackendIssue-200] - _ = x[ErrSiteReplicationServiceAccountError-201] - _ = x[ErrSiteReplicationBucketConfigError-202] - _ = x[ErrSiteReplicationBucketMetaError-203] - _ = x[ErrSiteReplicationIAMError-204] - _ = x[ErrSiteReplicationConfigMissing-205] - _ = x[ErrAdminRebalanceAlreadyStarted-206] - _ = x[ErrAdminRebalanceNotStarted-207] - _ = x[ErrAdminBucketQuotaExceeded-208] - _ = x[ErrAdminNoSuchQuotaConfiguration-209] - _ = x[ErrHealNotImplemented-210] - _ = x[ErrHealNoSuchProcess-211] - _ = x[ErrHealInvalidClientToken-212] - _ = x[ErrHealMissingBucket-213] - _ = x[ErrHealAlreadyRunning-214] - _ = x[ErrHealOverlappingPaths-215] - _ = x[ErrIncorrectContinuationToken-216] - _ = x[ErrEmptyRequestBody-217] - _ = x[ErrUnsupportedFunction-218] - _ = x[ErrInvalidExpressionType-219] - _ = x[ErrBusy-220] - _ = x[ErrUnauthorizedAccess-221] - _ = x[ErrExpressionTooLong-222] - _ = x[ErrIllegalSQLFunctionArgument-223] - _ = x[ErrInvalidKeyPath-224] - _ = x[ErrInvalidCompressionFormat-225] - _ = x[ErrInvalidFileHeaderInfo-226] - _ = x[ErrInvalidJSONType-227] - _ = x[ErrInvalidQuoteFields-228] - _ = x[ErrInvalidRequestParameter-229] - _ = x[ErrInvalidDataType-230] - _ = x[ErrInvalidTextEncoding-231] - _ = x[ErrInvalidDataSource-232] - _ = x[ErrInvalidTableAlias-233] - _ = x[ErrMissingRequiredParameter-234] - _ = x[ErrObjectSerializationConflict-235] - _ = x[ErrUnsupportedSQLOperation-236] - _ = x[ErrUnsupportedSQLStructure-237] - _ = x[ErrUnsupportedSyntax-238] - _ = x[ErrUnsupportedRangeHeader-239] - _ = x[ErrLexerInvalidChar-240] - _ = x[ErrLexerInvalidOperator-241] - _ = x[ErrLexerInvalidLiteral-242] - _ = x[ErrLexerInvalidIONLiteral-243] - _ = x[ErrParseExpectedDatePart-244] - _ = x[ErrParseExpectedKeyword-245] - _ = x[ErrParseExpectedTokenType-246] - _ = x[ErrParseExpected2TokenTypes-247] - _ = x[ErrParseExpectedNumber-248] - _ = x[ErrParseExpectedRightParenBuiltinFunctionCall-249] - _ = x[ErrParseExpectedTypeName-250] - _ = x[ErrParseExpectedWhenClause-251] - _ = x[ErrParseUnsupportedToken-252] - _ = x[ErrParseUnsupportedLiteralsGroupBy-253] - _ = x[ErrParseExpectedMember-254] - _ = x[ErrParseUnsupportedSelect-255] - _ = x[ErrParseUnsupportedCase-256] - _ = x[ErrParseUnsupportedCaseClause-257] - _ = x[ErrParseUnsupportedAlias-258] - _ = x[ErrParseUnsupportedSyntax-259] - _ = x[ErrParseUnknownOperator-260] - _ = x[ErrParseMissingIdentAfterAt-261] - _ = x[ErrParseUnexpectedOperator-262] - _ = x[ErrParseUnexpectedTerm-263] - _ = x[ErrParseUnexpectedToken-264] - _ = x[ErrParseUnexpectedKeyword-265] - _ = x[ErrParseExpectedExpression-266] - _ = x[ErrParseExpectedLeftParenAfterCast-267] - _ = x[ErrParseExpectedLeftParenValueConstructor-268] - _ = x[ErrParseExpectedLeftParenBuiltinFunctionCall-269] - _ = x[ErrParseExpectedArgumentDelimiter-270] - _ = x[ErrParseCastArity-271] - _ = x[ErrParseInvalidTypeParam-272] - _ = x[ErrParseEmptySelect-273] - _ = x[ErrParseSelectMissingFrom-274] - _ = x[ErrParseExpectedIdentForGroupName-275] - _ = x[ErrParseExpectedIdentForAlias-276] - _ = x[ErrParseUnsupportedCallWithStar-277] - _ = x[ErrParseNonUnaryAgregateFunctionCall-278] - _ = x[ErrParseMalformedJoin-279] - _ = x[ErrParseExpectedIdentForAt-280] - _ = x[ErrParseAsteriskIsNotAloneInSelectList-281] - _ = x[ErrParseCannotMixSqbAndWildcardInSelectList-282] - _ = x[ErrParseInvalidContextForWildcardInSelectList-283] - _ = x[ErrIncorrectSQLFunctionArgumentType-284] - _ = x[ErrValueParseFailure-285] - _ = x[ErrEvaluatorInvalidArguments-286] - _ = x[ErrIntegerOverflow-287] - _ = x[ErrLikeInvalidInputs-288] - _ = x[ErrCastFailed-289] - _ = x[ErrInvalidCast-290] - _ = x[ErrEvaluatorInvalidTimestampFormatPattern-291] - _ = x[ErrEvaluatorInvalidTimestampFormatPatternSymbolForParsing-292] - _ = x[ErrEvaluatorTimestampFormatPatternDuplicateFields-293] - _ = x[ErrEvaluatorTimestampFormatPatternHourClockAmPmMismatch-294] - _ = x[ErrEvaluatorUnterminatedTimestampFormatPatternToken-295] - _ = x[ErrEvaluatorInvalidTimestampFormatPatternToken-296] - _ = x[ErrEvaluatorInvalidTimestampFormatPatternSymbol-297] - _ = x[ErrEvaluatorBindingDoesNotExist-298] - _ = x[ErrMissingHeaders-299] - _ = x[ErrInvalidColumnIndex-300] - _ = x[ErrAdminConfigNotificationTargetsFailed-301] - _ = x[ErrAdminProfilerNotEnabled-302] - _ = x[ErrInvalidDecompressedSize-303] - _ = x[ErrAddUserInvalidArgument-304] - _ = x[ErrAdminResourceInvalidArgument-305] - _ = x[ErrAdminAccountNotEligible-306] - _ = x[ErrAccountNotEligible-307] - _ = x[ErrAdminServiceAccountNotFound-308] - _ = x[ErrPostPolicyConditionInvalidFormat-309] - _ = x[ErrInvalidChecksum-310] - _ = x[ErrLambdaARNInvalid-311] - _ = x[ErrLambdaARNNotFound-312] - _ = x[apiErrCodeEnd-313] + _ = x[ErrSlowDownRead-108] + _ = x[ErrSlowDownWrite-109] + _ = x[ErrInvalidPrefixMarker-110] + _ = x[ErrBadRequest-111] + _ = x[ErrKeyTooLongError-112] + _ = x[ErrInvalidBucketObjectLockConfiguration-113] + _ = x[ErrObjectLockConfigurationNotFound-114] + _ = x[ErrObjectLockConfigurationNotAllowed-115] + _ = x[ErrNoSuchObjectLockConfiguration-116] + _ = x[ErrObjectLocked-117] + _ = x[ErrInvalidRetentionDate-118] + _ = x[ErrPastObjectLockRetainDate-119] + _ = x[ErrUnknownWORMModeDirective-120] + _ = x[ErrBucketTaggingNotFound-121] + _ = x[ErrObjectLockInvalidHeaders-122] + _ = x[ErrInvalidTagDirective-123] + _ = x[ErrPolicyAlreadyAttached-124] + _ = x[ErrPolicyNotAttached-125] + _ = x[ErrExcessData-126] + _ = x[ErrInvalidEncryptionMethod-127] + _ = x[ErrInvalidEncryptionKeyID-128] + _ = x[ErrInsecureSSECustomerRequest-129] + _ = x[ErrSSEMultipartEncrypted-130] + _ = x[ErrSSEEncryptedObject-131] + _ = x[ErrInvalidEncryptionParameters-132] + _ = x[ErrInvalidEncryptionParametersSSEC-133] + _ = x[ErrInvalidSSECustomerAlgorithm-134] + _ = x[ErrInvalidSSECustomerKey-135] + _ = x[ErrMissingSSECustomerKey-136] + _ = x[ErrMissingSSECustomerKeyMD5-137] + _ = x[ErrSSECustomerKeyMD5Mismatch-138] + _ = x[ErrInvalidSSECustomerParameters-139] + _ = x[ErrIncompatibleEncryptionMethod-140] + _ = x[ErrKMSNotConfigured-141] + _ = x[ErrKMSKeyNotFoundException-142] + _ = x[ErrKMSDefaultKeyAlreadyConfigured-143] + _ = x[ErrNoAccessKey-144] + _ = x[ErrInvalidToken-145] + _ = x[ErrEventNotification-146] + _ = x[ErrARNNotification-147] + _ = x[ErrRegionNotification-148] + _ = x[ErrOverlappingFilterNotification-149] + _ = x[ErrFilterNameInvalid-150] + _ = x[ErrFilterNamePrefix-151] + _ = x[ErrFilterNameSuffix-152] + _ = x[ErrFilterValueInvalid-153] + _ = x[ErrOverlappingConfigs-154] + _ = x[ErrUnsupportedNotification-155] + _ = x[ErrContentSHA256Mismatch-156] + _ = x[ErrContentChecksumMismatch-157] + _ = x[ErrStorageFull-158] + _ = x[ErrRequestBodyParse-159] + _ = x[ErrObjectExistsAsDirectory-160] + _ = x[ErrInvalidObjectName-161] + _ = x[ErrInvalidObjectNamePrefixSlash-162] + _ = x[ErrInvalidResourceName-163] + _ = x[ErrInvalidLifecycleQueryParameter-164] + _ = x[ErrServerNotInitialized-165] + _ = x[ErrRequestTimedout-166] + _ = x[ErrClientDisconnected-167] + _ = x[ErrTooManyRequests-168] + _ = x[ErrInvalidRequest-169] + _ = x[ErrTransitionStorageClassNotFoundError-170] + _ = x[ErrInvalidStorageClass-171] + _ = x[ErrBackendDown-172] + _ = x[ErrMalformedJSON-173] + _ = x[ErrAdminNoSuchUser-174] + _ = x[ErrAdminNoSuchUserLDAPWarn-175] + _ = x[ErrAdminNoSuchGroup-176] + _ = x[ErrAdminGroupNotEmpty-177] + _ = x[ErrAdminGroupDisabled-178] + _ = x[ErrAdminNoSuchJob-179] + _ = x[ErrAdminNoSuchPolicy-180] + _ = x[ErrAdminPolicyChangeAlreadyApplied-181] + _ = x[ErrAdminInvalidArgument-182] + _ = x[ErrAdminInvalidAccessKey-183] + _ = x[ErrAdminInvalidSecretKey-184] + _ = x[ErrAdminConfigNoQuorum-185] + _ = x[ErrAdminConfigTooLarge-186] + _ = x[ErrAdminConfigBadJSON-187] + _ = x[ErrAdminNoSuchConfigTarget-188] + _ = x[ErrAdminConfigEnvOverridden-189] + _ = x[ErrAdminConfigDuplicateKeys-190] + _ = x[ErrAdminConfigInvalidIDPType-191] + _ = x[ErrAdminConfigLDAPNonDefaultConfigName-192] + _ = x[ErrAdminConfigLDAPValidation-193] + _ = x[ErrAdminConfigIDPCfgNameAlreadyExists-194] + _ = x[ErrAdminConfigIDPCfgNameDoesNotExist-195] + _ = x[ErrAdminCredentialsMismatch-196] + _ = x[ErrInsecureClientRequest-197] + _ = x[ErrObjectTampered-198] + _ = x[ErrSiteReplicationInvalidRequest-199] + _ = x[ErrSiteReplicationPeerResp-200] + _ = x[ErrSiteReplicationBackendIssue-201] + _ = x[ErrSiteReplicationServiceAccountError-202] + _ = x[ErrSiteReplicationBucketConfigError-203] + _ = x[ErrSiteReplicationBucketMetaError-204] + _ = x[ErrSiteReplicationIAMError-205] + _ = x[ErrSiteReplicationConfigMissing-206] + _ = x[ErrAdminRebalanceAlreadyStarted-207] + _ = x[ErrAdminRebalanceNotStarted-208] + _ = x[ErrAdminBucketQuotaExceeded-209] + _ = x[ErrAdminNoSuchQuotaConfiguration-210] + _ = x[ErrHealNotImplemented-211] + _ = x[ErrHealNoSuchProcess-212] + _ = x[ErrHealInvalidClientToken-213] + _ = x[ErrHealMissingBucket-214] + _ = x[ErrHealAlreadyRunning-215] + _ = x[ErrHealOverlappingPaths-216] + _ = x[ErrIncorrectContinuationToken-217] + _ = x[ErrEmptyRequestBody-218] + _ = x[ErrUnsupportedFunction-219] + _ = x[ErrInvalidExpressionType-220] + _ = x[ErrBusy-221] + _ = x[ErrUnauthorizedAccess-222] + _ = x[ErrExpressionTooLong-223] + _ = x[ErrIllegalSQLFunctionArgument-224] + _ = x[ErrInvalidKeyPath-225] + _ = x[ErrInvalidCompressionFormat-226] + _ = x[ErrInvalidFileHeaderInfo-227] + _ = x[ErrInvalidJSONType-228] + _ = x[ErrInvalidQuoteFields-229] + _ = x[ErrInvalidRequestParameter-230] + _ = x[ErrInvalidDataType-231] + _ = x[ErrInvalidTextEncoding-232] + _ = x[ErrInvalidDataSource-233] + _ = x[ErrInvalidTableAlias-234] + _ = x[ErrMissingRequiredParameter-235] + _ = x[ErrObjectSerializationConflict-236] + _ = x[ErrUnsupportedSQLOperation-237] + _ = x[ErrUnsupportedSQLStructure-238] + _ = x[ErrUnsupportedSyntax-239] + _ = x[ErrUnsupportedRangeHeader-240] + _ = x[ErrLexerInvalidChar-241] + _ = x[ErrLexerInvalidOperator-242] + _ = x[ErrLexerInvalidLiteral-243] + _ = x[ErrLexerInvalidIONLiteral-244] + _ = x[ErrParseExpectedDatePart-245] + _ = x[ErrParseExpectedKeyword-246] + _ = x[ErrParseExpectedTokenType-247] + _ = x[ErrParseExpected2TokenTypes-248] + _ = x[ErrParseExpectedNumber-249] + _ = x[ErrParseExpectedRightParenBuiltinFunctionCall-250] + _ = x[ErrParseExpectedTypeName-251] + _ = x[ErrParseExpectedWhenClause-252] + _ = x[ErrParseUnsupportedToken-253] + _ = x[ErrParseUnsupportedLiteralsGroupBy-254] + _ = x[ErrParseExpectedMember-255] + _ = x[ErrParseUnsupportedSelect-256] + _ = x[ErrParseUnsupportedCase-257] + _ = x[ErrParseUnsupportedCaseClause-258] + _ = x[ErrParseUnsupportedAlias-259] + _ = x[ErrParseUnsupportedSyntax-260] + _ = x[ErrParseUnknownOperator-261] + _ = x[ErrParseMissingIdentAfterAt-262] + _ = x[ErrParseUnexpectedOperator-263] + _ = x[ErrParseUnexpectedTerm-264] + _ = x[ErrParseUnexpectedToken-265] + _ = x[ErrParseUnexpectedKeyword-266] + _ = x[ErrParseExpectedExpression-267] + _ = x[ErrParseExpectedLeftParenAfterCast-268] + _ = x[ErrParseExpectedLeftParenValueConstructor-269] + _ = x[ErrParseExpectedLeftParenBuiltinFunctionCall-270] + _ = x[ErrParseExpectedArgumentDelimiter-271] + _ = x[ErrParseCastArity-272] + _ = x[ErrParseInvalidTypeParam-273] + _ = x[ErrParseEmptySelect-274] + _ = x[ErrParseSelectMissingFrom-275] + _ = x[ErrParseExpectedIdentForGroupName-276] + _ = x[ErrParseExpectedIdentForAlias-277] + _ = x[ErrParseUnsupportedCallWithStar-278] + _ = x[ErrParseNonUnaryAgregateFunctionCall-279] + _ = x[ErrParseMalformedJoin-280] + _ = x[ErrParseExpectedIdentForAt-281] + _ = x[ErrParseAsteriskIsNotAloneInSelectList-282] + _ = x[ErrParseCannotMixSqbAndWildcardInSelectList-283] + _ = x[ErrParseInvalidContextForWildcardInSelectList-284] + _ = x[ErrIncorrectSQLFunctionArgumentType-285] + _ = x[ErrValueParseFailure-286] + _ = x[ErrEvaluatorInvalidArguments-287] + _ = x[ErrIntegerOverflow-288] + _ = x[ErrLikeInvalidInputs-289] + _ = x[ErrCastFailed-290] + _ = x[ErrInvalidCast-291] + _ = x[ErrEvaluatorInvalidTimestampFormatPattern-292] + _ = x[ErrEvaluatorInvalidTimestampFormatPatternSymbolForParsing-293] + _ = x[ErrEvaluatorTimestampFormatPatternDuplicateFields-294] + _ = x[ErrEvaluatorTimestampFormatPatternHourClockAmPmMismatch-295] + _ = x[ErrEvaluatorUnterminatedTimestampFormatPatternToken-296] + _ = x[ErrEvaluatorInvalidTimestampFormatPatternToken-297] + _ = x[ErrEvaluatorInvalidTimestampFormatPatternSymbol-298] + _ = x[ErrEvaluatorBindingDoesNotExist-299] + _ = x[ErrMissingHeaders-300] + _ = x[ErrInvalidColumnIndex-301] + _ = x[ErrAdminConfigNotificationTargetsFailed-302] + _ = x[ErrAdminProfilerNotEnabled-303] + _ = x[ErrInvalidDecompressedSize-304] + _ = x[ErrAddUserInvalidArgument-305] + _ = x[ErrAdminResourceInvalidArgument-306] + _ = x[ErrAdminAccountNotEligible-307] + _ = x[ErrAccountNotEligible-308] + _ = x[ErrAdminServiceAccountNotFound-309] + _ = x[ErrPostPolicyConditionInvalidFormat-310] + _ = x[ErrInvalidChecksum-311] + _ = x[ErrLambdaARNInvalid-312] + _ = x[ErrLambdaARNNotFound-313] + _ = x[apiErrCodeEnd-314] } -const _APIErrorCode_name = "NoneAccessDeniedBadDigestEntityTooSmallEntityTooLargePolicyTooLargeIncompleteBodyInternalErrorInvalidAccessKeyIDAccessKeyDisabledInvalidArgumentInvalidBucketNameInvalidDigestInvalidRangeInvalidRangePartNumberInvalidCopyPartRangeInvalidCopyPartRangeSourceInvalidMaxKeysInvalidEncodingMethodInvalidMaxUploadsInvalidMaxPartsInvalidPartNumberMarkerInvalidPartNumberInvalidRequestBodyInvalidCopySourceInvalidMetadataDirectiveInvalidCopyDestInvalidPolicyDocumentInvalidObjectStateMalformedXMLMissingContentLengthMissingContentMD5MissingRequestBodyErrorMissingSecurityHeaderNoSuchBucketNoSuchBucketPolicyNoSuchBucketLifecycleNoSuchLifecycleConfigurationInvalidLifecycleWithObjectLockNoSuchBucketSSEConfigNoSuchCORSConfigurationNoSuchWebsiteConfigurationReplicationConfigurationNotFoundErrorRemoteDestinationNotFoundErrorReplicationDestinationMissingLockRemoteTargetNotFoundErrorReplicationRemoteConnectionErrorReplicationBandwidthLimitErrorBucketRemoteIdenticalToSourceBucketRemoteAlreadyExistsBucketRemoteLabelInUseBucketRemoteArnTypeInvalidBucketRemoteArnInvalidBucketRemoteRemoveDisallowedRemoteTargetNotVersionedErrorReplicationSourceNotVersionedErrorReplicationNeedsVersioningErrorReplicationBucketNeedsVersioningErrorReplicationDenyEditErrorRemoteTargetDenyAddErrorReplicationNoExistingObjectsObjectRestoreAlreadyInProgressNoSuchKeyNoSuchUploadInvalidVersionIDNoSuchVersionNotImplementedPreconditionFailedRequestTimeTooSkewedSignatureDoesNotMatchMethodNotAllowedInvalidPartInvalidPartOrderMissingPartAuthorizationHeaderMalformedMalformedPOSTRequestPOSTFileRequiredSignatureVersionNotSupportedBucketNotEmptyAllAccessDisabledPolicyInvalidVersionMissingFieldsMissingCredTagCredMalformedInvalidRegionInvalidServiceS3InvalidServiceSTSInvalidRequestVersionMissingSignTagMissingSignHeadersTagMalformedDateMalformedPresignedDateMalformedCredentialDateMalformedExpiresNegativeExpiresAuthHeaderEmptyExpiredPresignRequestRequestNotReadyYetUnsignedHeadersMissingDateHeaderInvalidQuerySignatureAlgoInvalidQueryParamsBucketAlreadyOwnedByYouInvalidDurationBucketAlreadyExistsMetadataTooLargeUnsupportedMetadataMaximumExpiresSlowDownInvalidPrefixMarkerBadRequestKeyTooLongErrorInvalidBucketObjectLockConfigurationObjectLockConfigurationNotFoundObjectLockConfigurationNotAllowedNoSuchObjectLockConfigurationObjectLockedInvalidRetentionDatePastObjectLockRetainDateUnknownWORMModeDirectiveBucketTaggingNotFoundObjectLockInvalidHeadersInvalidTagDirectivePolicyAlreadyAttachedPolicyNotAttachedExcessDataInvalidEncryptionMethodInvalidEncryptionKeyIDInsecureSSECustomerRequestSSEMultipartEncryptedSSEEncryptedObjectInvalidEncryptionParametersInvalidEncryptionParametersSSECInvalidSSECustomerAlgorithmInvalidSSECustomerKeyMissingSSECustomerKeyMissingSSECustomerKeyMD5SSECustomerKeyMD5MismatchInvalidSSECustomerParametersIncompatibleEncryptionMethodKMSNotConfiguredKMSKeyNotFoundExceptionKMSDefaultKeyAlreadyConfiguredNoAccessKeyInvalidTokenEventNotificationARNNotificationRegionNotificationOverlappingFilterNotificationFilterNameInvalidFilterNamePrefixFilterNameSuffixFilterValueInvalidOverlappingConfigsUnsupportedNotificationContentSHA256MismatchContentChecksumMismatchStorageFullRequestBodyParseObjectExistsAsDirectoryInvalidObjectNameInvalidObjectNamePrefixSlashInvalidResourceNameInvalidLifecycleQueryParameterServerNotInitializedOperationTimedOutClientDisconnectedOperationMaxedOutInvalidRequestTransitionStorageClassNotFoundErrorInvalidStorageClassBackendDownMalformedJSONAdminNoSuchUserAdminNoSuchUserLDAPWarnAdminNoSuchGroupAdminGroupNotEmptyAdminGroupDisabledAdminNoSuchJobAdminNoSuchPolicyAdminPolicyChangeAlreadyAppliedAdminInvalidArgumentAdminInvalidAccessKeyAdminInvalidSecretKeyAdminConfigNoQuorumAdminConfigTooLargeAdminConfigBadJSONAdminNoSuchConfigTargetAdminConfigEnvOverriddenAdminConfigDuplicateKeysAdminConfigInvalidIDPTypeAdminConfigLDAPNonDefaultConfigNameAdminConfigLDAPValidationAdminConfigIDPCfgNameAlreadyExistsAdminConfigIDPCfgNameDoesNotExistAdminCredentialsMismatchInsecureClientRequestObjectTamperedSiteReplicationInvalidRequestSiteReplicationPeerRespSiteReplicationBackendIssueSiteReplicationServiceAccountErrorSiteReplicationBucketConfigErrorSiteReplicationBucketMetaErrorSiteReplicationIAMErrorSiteReplicationConfigMissingAdminRebalanceAlreadyStartedAdminRebalanceNotStartedAdminBucketQuotaExceededAdminNoSuchQuotaConfigurationHealNotImplementedHealNoSuchProcessHealInvalidClientTokenHealMissingBucketHealAlreadyRunningHealOverlappingPathsIncorrectContinuationTokenEmptyRequestBodyUnsupportedFunctionInvalidExpressionTypeBusyUnauthorizedAccessExpressionTooLongIllegalSQLFunctionArgumentInvalidKeyPathInvalidCompressionFormatInvalidFileHeaderInfoInvalidJSONTypeInvalidQuoteFieldsInvalidRequestParameterInvalidDataTypeInvalidTextEncodingInvalidDataSourceInvalidTableAliasMissingRequiredParameterObjectSerializationConflictUnsupportedSQLOperationUnsupportedSQLStructureUnsupportedSyntaxUnsupportedRangeHeaderLexerInvalidCharLexerInvalidOperatorLexerInvalidLiteralLexerInvalidIONLiteralParseExpectedDatePartParseExpectedKeywordParseExpectedTokenTypeParseExpected2TokenTypesParseExpectedNumberParseExpectedRightParenBuiltinFunctionCallParseExpectedTypeNameParseExpectedWhenClauseParseUnsupportedTokenParseUnsupportedLiteralsGroupByParseExpectedMemberParseUnsupportedSelectParseUnsupportedCaseParseUnsupportedCaseClauseParseUnsupportedAliasParseUnsupportedSyntaxParseUnknownOperatorParseMissingIdentAfterAtParseUnexpectedOperatorParseUnexpectedTermParseUnexpectedTokenParseUnexpectedKeywordParseExpectedExpressionParseExpectedLeftParenAfterCastParseExpectedLeftParenValueConstructorParseExpectedLeftParenBuiltinFunctionCallParseExpectedArgumentDelimiterParseCastArityParseInvalidTypeParamParseEmptySelectParseSelectMissingFromParseExpectedIdentForGroupNameParseExpectedIdentForAliasParseUnsupportedCallWithStarParseNonUnaryAgregateFunctionCallParseMalformedJoinParseExpectedIdentForAtParseAsteriskIsNotAloneInSelectListParseCannotMixSqbAndWildcardInSelectListParseInvalidContextForWildcardInSelectListIncorrectSQLFunctionArgumentTypeValueParseFailureEvaluatorInvalidArgumentsIntegerOverflowLikeInvalidInputsCastFailedInvalidCastEvaluatorInvalidTimestampFormatPatternEvaluatorInvalidTimestampFormatPatternSymbolForParsingEvaluatorTimestampFormatPatternDuplicateFieldsEvaluatorTimestampFormatPatternHourClockAmPmMismatchEvaluatorUnterminatedTimestampFormatPatternTokenEvaluatorInvalidTimestampFormatPatternTokenEvaluatorInvalidTimestampFormatPatternSymbolEvaluatorBindingDoesNotExistMissingHeadersInvalidColumnIndexAdminConfigNotificationTargetsFailedAdminProfilerNotEnabledInvalidDecompressedSizeAddUserInvalidArgumentAdminResourceInvalidArgumentAdminAccountNotEligibleAccountNotEligibleAdminServiceAccountNotFoundPostPolicyConditionInvalidFormatInvalidChecksumLambdaARNInvalidLambdaARNNotFoundapiErrCodeEnd" +const _APIErrorCode_name = "NoneAccessDeniedBadDigestEntityTooSmallEntityTooLargePolicyTooLargeIncompleteBodyInternalErrorInvalidAccessKeyIDAccessKeyDisabledInvalidArgumentInvalidBucketNameInvalidDigestInvalidRangeInvalidRangePartNumberInvalidCopyPartRangeInvalidCopyPartRangeSourceInvalidMaxKeysInvalidEncodingMethodInvalidMaxUploadsInvalidMaxPartsInvalidPartNumberMarkerInvalidPartNumberInvalidRequestBodyInvalidCopySourceInvalidMetadataDirectiveInvalidCopyDestInvalidPolicyDocumentInvalidObjectStateMalformedXMLMissingContentLengthMissingContentMD5MissingRequestBodyErrorMissingSecurityHeaderNoSuchBucketNoSuchBucketPolicyNoSuchBucketLifecycleNoSuchLifecycleConfigurationInvalidLifecycleWithObjectLockNoSuchBucketSSEConfigNoSuchCORSConfigurationNoSuchWebsiteConfigurationReplicationConfigurationNotFoundErrorRemoteDestinationNotFoundErrorReplicationDestinationMissingLockRemoteTargetNotFoundErrorReplicationRemoteConnectionErrorReplicationBandwidthLimitErrorBucketRemoteIdenticalToSourceBucketRemoteAlreadyExistsBucketRemoteLabelInUseBucketRemoteArnTypeInvalidBucketRemoteArnInvalidBucketRemoteRemoveDisallowedRemoteTargetNotVersionedErrorReplicationSourceNotVersionedErrorReplicationNeedsVersioningErrorReplicationBucketNeedsVersioningErrorReplicationDenyEditErrorRemoteTargetDenyAddErrorReplicationNoExistingObjectsObjectRestoreAlreadyInProgressNoSuchKeyNoSuchUploadInvalidVersionIDNoSuchVersionNotImplementedPreconditionFailedRequestTimeTooSkewedSignatureDoesNotMatchMethodNotAllowedInvalidPartInvalidPartOrderMissingPartAuthorizationHeaderMalformedMalformedPOSTRequestPOSTFileRequiredSignatureVersionNotSupportedBucketNotEmptyAllAccessDisabledPolicyInvalidVersionMissingFieldsMissingCredTagCredMalformedInvalidRegionInvalidServiceS3InvalidServiceSTSInvalidRequestVersionMissingSignTagMissingSignHeadersTagMalformedDateMalformedPresignedDateMalformedCredentialDateMalformedExpiresNegativeExpiresAuthHeaderEmptyExpiredPresignRequestRequestNotReadyYetUnsignedHeadersMissingDateHeaderInvalidQuerySignatureAlgoInvalidQueryParamsBucketAlreadyOwnedByYouInvalidDurationBucketAlreadyExistsMetadataTooLargeUnsupportedMetadataMaximumExpiresSlowDownReadSlowDownWriteInvalidPrefixMarkerBadRequestKeyTooLongErrorInvalidBucketObjectLockConfigurationObjectLockConfigurationNotFoundObjectLockConfigurationNotAllowedNoSuchObjectLockConfigurationObjectLockedInvalidRetentionDatePastObjectLockRetainDateUnknownWORMModeDirectiveBucketTaggingNotFoundObjectLockInvalidHeadersInvalidTagDirectivePolicyAlreadyAttachedPolicyNotAttachedExcessDataInvalidEncryptionMethodInvalidEncryptionKeyIDInsecureSSECustomerRequestSSEMultipartEncryptedSSEEncryptedObjectInvalidEncryptionParametersInvalidEncryptionParametersSSECInvalidSSECustomerAlgorithmInvalidSSECustomerKeyMissingSSECustomerKeyMissingSSECustomerKeyMD5SSECustomerKeyMD5MismatchInvalidSSECustomerParametersIncompatibleEncryptionMethodKMSNotConfiguredKMSKeyNotFoundExceptionKMSDefaultKeyAlreadyConfiguredNoAccessKeyInvalidTokenEventNotificationARNNotificationRegionNotificationOverlappingFilterNotificationFilterNameInvalidFilterNamePrefixFilterNameSuffixFilterValueInvalidOverlappingConfigsUnsupportedNotificationContentSHA256MismatchContentChecksumMismatchStorageFullRequestBodyParseObjectExistsAsDirectoryInvalidObjectNameInvalidObjectNamePrefixSlashInvalidResourceNameInvalidLifecycleQueryParameterServerNotInitializedRequestTimedoutClientDisconnectedTooManyRequestsInvalidRequestTransitionStorageClassNotFoundErrorInvalidStorageClassBackendDownMalformedJSONAdminNoSuchUserAdminNoSuchUserLDAPWarnAdminNoSuchGroupAdminGroupNotEmptyAdminGroupDisabledAdminNoSuchJobAdminNoSuchPolicyAdminPolicyChangeAlreadyAppliedAdminInvalidArgumentAdminInvalidAccessKeyAdminInvalidSecretKeyAdminConfigNoQuorumAdminConfigTooLargeAdminConfigBadJSONAdminNoSuchConfigTargetAdminConfigEnvOverriddenAdminConfigDuplicateKeysAdminConfigInvalidIDPTypeAdminConfigLDAPNonDefaultConfigNameAdminConfigLDAPValidationAdminConfigIDPCfgNameAlreadyExistsAdminConfigIDPCfgNameDoesNotExistAdminCredentialsMismatchInsecureClientRequestObjectTamperedSiteReplicationInvalidRequestSiteReplicationPeerRespSiteReplicationBackendIssueSiteReplicationServiceAccountErrorSiteReplicationBucketConfigErrorSiteReplicationBucketMetaErrorSiteReplicationIAMErrorSiteReplicationConfigMissingAdminRebalanceAlreadyStartedAdminRebalanceNotStartedAdminBucketQuotaExceededAdminNoSuchQuotaConfigurationHealNotImplementedHealNoSuchProcessHealInvalidClientTokenHealMissingBucketHealAlreadyRunningHealOverlappingPathsIncorrectContinuationTokenEmptyRequestBodyUnsupportedFunctionInvalidExpressionTypeBusyUnauthorizedAccessExpressionTooLongIllegalSQLFunctionArgumentInvalidKeyPathInvalidCompressionFormatInvalidFileHeaderInfoInvalidJSONTypeInvalidQuoteFieldsInvalidRequestParameterInvalidDataTypeInvalidTextEncodingInvalidDataSourceInvalidTableAliasMissingRequiredParameterObjectSerializationConflictUnsupportedSQLOperationUnsupportedSQLStructureUnsupportedSyntaxUnsupportedRangeHeaderLexerInvalidCharLexerInvalidOperatorLexerInvalidLiteralLexerInvalidIONLiteralParseExpectedDatePartParseExpectedKeywordParseExpectedTokenTypeParseExpected2TokenTypesParseExpectedNumberParseExpectedRightParenBuiltinFunctionCallParseExpectedTypeNameParseExpectedWhenClauseParseUnsupportedTokenParseUnsupportedLiteralsGroupByParseExpectedMemberParseUnsupportedSelectParseUnsupportedCaseParseUnsupportedCaseClauseParseUnsupportedAliasParseUnsupportedSyntaxParseUnknownOperatorParseMissingIdentAfterAtParseUnexpectedOperatorParseUnexpectedTermParseUnexpectedTokenParseUnexpectedKeywordParseExpectedExpressionParseExpectedLeftParenAfterCastParseExpectedLeftParenValueConstructorParseExpectedLeftParenBuiltinFunctionCallParseExpectedArgumentDelimiterParseCastArityParseInvalidTypeParamParseEmptySelectParseSelectMissingFromParseExpectedIdentForGroupNameParseExpectedIdentForAliasParseUnsupportedCallWithStarParseNonUnaryAgregateFunctionCallParseMalformedJoinParseExpectedIdentForAtParseAsteriskIsNotAloneInSelectListParseCannotMixSqbAndWildcardInSelectListParseInvalidContextForWildcardInSelectListIncorrectSQLFunctionArgumentTypeValueParseFailureEvaluatorInvalidArgumentsIntegerOverflowLikeInvalidInputsCastFailedInvalidCastEvaluatorInvalidTimestampFormatPatternEvaluatorInvalidTimestampFormatPatternSymbolForParsingEvaluatorTimestampFormatPatternDuplicateFieldsEvaluatorTimestampFormatPatternHourClockAmPmMismatchEvaluatorUnterminatedTimestampFormatPatternTokenEvaluatorInvalidTimestampFormatPatternTokenEvaluatorInvalidTimestampFormatPatternSymbolEvaluatorBindingDoesNotExistMissingHeadersInvalidColumnIndexAdminConfigNotificationTargetsFailedAdminProfilerNotEnabledInvalidDecompressedSizeAddUserInvalidArgumentAdminResourceInvalidArgumentAdminAccountNotEligibleAccountNotEligibleAdminServiceAccountNotFoundPostPolicyConditionInvalidFormatInvalidChecksumLambdaARNInvalidLambdaARNNotFoundapiErrCodeEnd" -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, 1322, 1331, 1343, 1359, 1372, 1386, 1404, 1424, 1445, 1461, 1472, 1488, 1499, 1527, 1547, 1563, 1591, 1605, 1622, 1642, 1655, 1669, 1682, 1695, 1711, 1728, 1749, 1763, 1784, 1797, 1819, 1842, 1858, 1873, 1888, 1909, 1927, 1942, 1959, 1984, 2002, 2025, 2040, 2059, 2075, 2094, 2108, 2116, 2135, 2145, 2160, 2196, 2227, 2260, 2289, 2301, 2321, 2345, 2369, 2390, 2414, 2433, 2454, 2471, 2481, 2504, 2526, 2552, 2573, 2591, 2618, 2649, 2676, 2697, 2718, 2742, 2767, 2795, 2823, 2839, 2862, 2892, 2903, 2915, 2932, 2947, 2965, 2994, 3011, 3027, 3043, 3061, 3079, 3102, 3123, 3146, 3157, 3173, 3196, 3213, 3241, 3260, 3290, 3310, 3327, 3345, 3362, 3376, 3411, 3430, 3441, 3454, 3469, 3492, 3508, 3526, 3544, 3558, 3575, 3606, 3626, 3647, 3668, 3687, 3706, 3724, 3747, 3771, 3795, 3820, 3855, 3880, 3914, 3947, 3971, 3992, 4006, 4035, 4058, 4085, 4119, 4151, 4181, 4204, 4232, 4260, 4284, 4308, 4337, 4355, 4372, 4394, 4411, 4429, 4449, 4475, 4491, 4510, 4531, 4535, 4553, 4570, 4596, 4610, 4634, 4655, 4670, 4688, 4711, 4726, 4745, 4762, 4779, 4803, 4830, 4853, 4876, 4893, 4915, 4931, 4951, 4970, 4992, 5013, 5033, 5055, 5079, 5098, 5140, 5161, 5184, 5205, 5236, 5255, 5277, 5297, 5323, 5344, 5366, 5386, 5410, 5433, 5452, 5472, 5494, 5517, 5548, 5586, 5627, 5657, 5671, 5692, 5708, 5730, 5760, 5786, 5814, 5847, 5865, 5888, 5923, 5963, 6005, 6037, 6054, 6079, 6094, 6111, 6121, 6132, 6170, 6224, 6270, 6322, 6370, 6413, 6457, 6485, 6499, 6517, 6553, 6576, 6599, 6621, 6649, 6672, 6690, 6717, 6749, 6764, 6780, 6797, 6810} +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, 1322, 1331, 1343, 1359, 1372, 1386, 1404, 1424, 1445, 1461, 1472, 1488, 1499, 1527, 1547, 1563, 1591, 1605, 1622, 1642, 1655, 1669, 1682, 1695, 1711, 1728, 1749, 1763, 1784, 1797, 1819, 1842, 1858, 1873, 1888, 1909, 1927, 1942, 1959, 1984, 2002, 2025, 2040, 2059, 2075, 2094, 2108, 2120, 2133, 2152, 2162, 2177, 2213, 2244, 2277, 2306, 2318, 2338, 2362, 2386, 2407, 2431, 2450, 2471, 2488, 2498, 2521, 2543, 2569, 2590, 2608, 2635, 2666, 2693, 2714, 2735, 2759, 2784, 2812, 2840, 2856, 2879, 2909, 2920, 2932, 2949, 2964, 2982, 3011, 3028, 3044, 3060, 3078, 3096, 3119, 3140, 3163, 3174, 3190, 3213, 3230, 3258, 3277, 3307, 3327, 3342, 3360, 3375, 3389, 3424, 3443, 3454, 3467, 3482, 3505, 3521, 3539, 3557, 3571, 3588, 3619, 3639, 3660, 3681, 3700, 3719, 3737, 3760, 3784, 3808, 3833, 3868, 3893, 3927, 3960, 3984, 4005, 4019, 4048, 4071, 4098, 4132, 4164, 4194, 4217, 4245, 4273, 4297, 4321, 4350, 4368, 4385, 4407, 4424, 4442, 4462, 4488, 4504, 4523, 4544, 4548, 4566, 4583, 4609, 4623, 4647, 4668, 4683, 4701, 4724, 4739, 4758, 4775, 4792, 4816, 4843, 4866, 4889, 4906, 4928, 4944, 4964, 4983, 5005, 5026, 5046, 5068, 5092, 5111, 5153, 5174, 5197, 5218, 5249, 5268, 5290, 5310, 5336, 5357, 5379, 5399, 5423, 5446, 5465, 5485, 5507, 5530, 5561, 5599, 5640, 5670, 5684, 5705, 5721, 5743, 5773, 5799, 5827, 5860, 5878, 5901, 5936, 5976, 6018, 6050, 6067, 6092, 6107, 6124, 6134, 6145, 6183, 6237, 6283, 6335, 6383, 6426, 6470, 6498, 6512, 6530, 6566, 6589, 6612, 6634, 6662, 6685, 6703, 6730, 6762, 6777, 6793, 6810, 6823} func (i APIErrorCode) String() string { if i < 0 || i >= APIErrorCode(len(_APIErrorCode_index)-1) { diff --git a/cmd/background-newdisks-heal-ops.go b/cmd/background-newdisks-heal-ops.go index 818c01d2c..1efe2206c 100644 --- a/cmd/background-newdisks-heal-ops.go +++ b/cmd/background-newdisks-heal-ops.go @@ -32,7 +32,9 @@ import ( "github.com/dustin/go-humanize" "github.com/minio/madmin-go/v2" "github.com/minio/minio-go/v7/pkg/set" + "github.com/minio/minio/internal/config" "github.com/minio/minio/internal/logger" + "github.com/minio/pkg/env" ) const ( @@ -345,7 +347,9 @@ func initAutoHeal(ctx context.Context, objAPI ObjectLayer) { globalBackgroundHealState.pushHealLocalDisks(getLocalDisksToHeal()...) - go monitorLocalDisksAndHeal(ctx, z) + if env.Get("_MINIO_AUTO_DISK_HEALING", config.EnableOn) == config.EnableOn { + go monitorLocalDisksAndHeal(ctx, z) + } } func getLocalDisksToHeal() (disksToHeal Endpoints) { diff --git a/cmd/bucket-handlers.go b/cmd/bucket-handlers.go index f2e5a33ad..b95130c8d 100644 --- a/cmd/bucket-handlers.go +++ b/cmd/bucket-handlers.go @@ -1532,10 +1532,7 @@ func (api objectAPIHandlers) HeadBucketHandler(w http.ResponseWriter, r *http.Re } if s3Error := checkRequestAuthType(ctx, r, policy.ListBucketAction, bucket, ""); s3Error != ErrNone { - errCode := errorCodes.ToAPIErr(s3Error) - w.Header().Set(xMinIOErrCodeHeader, errCode.Code) - w.Header().Set(xMinIOErrDescHeader, "\""+errCode.Description+"\"") - writeErrorResponseHeadersOnly(w, errCode) + writeErrorResponseHeadersOnly(w, errorCodes.ToAPIErr(s3Error)) return } diff --git a/cmd/bucket-replication.go b/cmd/bucket-replication.go index 6f2830f58..f66d6eafd 100644 --- a/cmd/bucket-replication.go +++ b/cmd/bucket-replication.go @@ -1385,16 +1385,23 @@ func (ri ReplicateObjectInfo) replicateAll(ctx context.Context, objectAPI Object } } // if target returns error other than NoSuchKey, defer replication attempt - if cerr != nil && minio.ToErrorResponse(cerr).Code != "NoSuchKey" && minio.ToErrorResponse(cerr).Code != "NoSuchVersion" { - logger.LogIf(ctx, fmt.Errorf("unable to replicate %s/%s (%s). Target returned %s error on HEAD", bucket, object, objInfo.VersionID, cerr)) - sendEvent(eventArgs{ - EventName: event.ObjectReplicationNotTracked, - BucketName: bucket, - Object: objInfo, - UserAgent: "Internal: [Replication]", - Host: globalLocalNodeName, - }) - return + if cerr != nil { + errResp := minio.ToErrorResponse(cerr) + switch errResp.Code { + case "NoSuchKey", "NoSuchVersion", "SlowDownRead": + rAction = replicateAll + default: + logger.LogIf(ctx, fmt.Errorf("unable to replicate %s/%s (%s). Target (%s) returned %s error on HEAD", + bucket, object, objInfo.VersionID, tgt.EndpointURL(), cerr)) + sendEvent(eventArgs{ + EventName: event.ObjectReplicationNotTracked, + BucketName: bucket, + Object: objInfo, + UserAgent: "Internal: [Replication]", + Host: globalLocalNodeName, + }) + return + } } rinfo.ReplicationStatus = replication.Completed rinfo.Size = size diff --git a/cmd/erasure-healing.go b/cmd/erasure-healing.go index ab129f6b1..a16224221 100644 --- a/cmd/erasure-healing.go +++ b/cmd/erasure-healing.go @@ -503,7 +503,7 @@ func (er *erasureObjects) healObject(ctx context.Context, bucket string, object if !latestMeta.XLV1 && !latestMeta.Deleted && !recreate && disksToHealCount > latestMeta.Erasure.ParityBlocks { // When disk to heal count is greater than parity blocks we should simply error out. - err := fmt.Errorf("more drives are expected to heal than parity, returned errors: %v (dataErrs %v) -> %s/%s(%s)", errs, dataErrs, bucket, object, versionID) + err := fmt.Errorf("(%d > %d) more drives are expected to heal than parity, returned errors: %v (dataErrs %v) -> %s/%s(%s)", disksToHealCount, latestMeta.Erasure.ParityBlocks, errs, dataErrs, bucket, object, versionID) logger.LogIf(ctx, err) return er.defaultHealResult(latestMeta, storageDisks, storageEndpoints, errs, bucket, object, versionID), err @@ -1012,9 +1012,6 @@ func isObjectDangling(metaArr []FileInfo, errs []error, dataErrs []error) (valid notFoundMetaErrs, corruptedMetaErrs, driveNotFoundMetaErrs := danglingErrsCount(errs) notFoundPartsErrs, corruptedPartsErrs, driveNotFoundPartsErrs := danglingErrsCount(ndataErrs) - if driveNotFoundMetaErrs > 0 || driveNotFoundPartsErrs > 0 { - return validMeta, false - } for _, m := range metaArr { if m.IsValid() { validMeta = m @@ -1027,6 +1024,10 @@ func isObjectDangling(metaArr []FileInfo, errs []error, dataErrs []error) (valid return validMeta, false } + if driveNotFoundMetaErrs > 0 || driveNotFoundPartsErrs > 0 { + return validMeta, false + } + if validMeta.Deleted { // notFoundPartsErrs is ignored since // - delete marker does not have any parts diff --git a/cmd/erasure-metadata.go b/cmd/erasure-metadata.go index 6f6a7758e..277986e4f 100644 --- a/cmd/erasure-metadata.go +++ b/cmd/erasure-metadata.go @@ -350,6 +350,7 @@ func findFileInfoInQuorum(ctx context.Context, metaArr []FileInfo, modTime time. for _, part := range meta.Parts { fmt.Fprintf(h, "part.%d", part.Number) } + fmt.Fprintf(h, "%v+%v", meta.Erasure.DataBlocks, meta.Erasure.ParityBlocks) fmt.Fprintf(h, "%v", meta.Erasure.Distribution) // ILM transition fields diff --git a/cmd/erasure-object.go b/cmd/erasure-object.go index 2dd8022f7..22cf9cf08 100644 --- a/cmd/erasure-object.go +++ b/cmd/erasure-object.go @@ -374,6 +374,9 @@ func (er erasureObjects) getObjectWithFileInfo(ctx context.Context, bucket, obje if !metaArr[index].IsValid() { continue } + if !metaArr[index].Erasure.Equal(fi.Erasure) { + continue + } checksumInfo := metaArr[index].Erasure.GetChecksumInfo(partNumber) partPath := pathJoin(object, metaArr[index].DataDir, fmt.Sprintf("part.%d", partNumber)) readers[index] = newBitrotReader(disk, metaArr[index].Data, bucket, partPath, tillOffset, @@ -1008,13 +1011,24 @@ func (er erasureObjects) putObject(ctx context.Context, bucket string, object st data := r.Reader if opts.CheckPrecondFn != nil { - obj, err := er.getObjectInfo(ctx, bucket, object, opts) - if err != nil && !isErrVersionNotFound(err) && !isErrObjectNotFound(err) { - return objInfo, err + if !opts.NoLock { + ns := er.NewNSLock(bucket, object) + lkctx, err := ns.GetLock(ctx, globalOperationTimeout) + if err != nil { + return ObjectInfo{}, err + } + ctx = lkctx.Context() + defer ns.Unlock(lkctx) + opts.NoLock = true } - if opts.CheckPrecondFn(obj) { + + obj, err := er.getObjectInfo(ctx, bucket, object, opts) + if err == nil && opts.CheckPrecondFn(obj) { return objInfo, PreConditionFailed{} } + if err != nil && !isErrVersionNotFound(err) && !isErrObjectNotFound(err) && !isErrReadQuorum(err) { + return objInfo, err + } } // Validate input data size and it can never be less than -1. diff --git a/cmd/handler-api.go b/cmd/handler-api.go index 05f357328..2ae505058 100644 --- a/cmd/handler-api.go +++ b/cmd/handler-api.go @@ -317,7 +317,7 @@ func maxClients(f http.HandlerFunc) http.HandlerFunc { case <-deadlineTimer.C: // Send a http timeout message writeErrorResponse(r.Context(), w, - errorCodes.ToAPIErr(ErrOperationMaxedOut), + errorCodes.ToAPIErr(ErrTooManyRequests), r.URL) globalHTTPStats.addRequestsInQueue(-1) return diff --git a/cmd/listen-notification-handlers.go b/cmd/listen-notification-handlers.go index 6752393dc..13be7c978 100644 --- a/cmd/listen-notification-handlers.go +++ b/cmd/listen-notification-handlers.go @@ -129,7 +129,7 @@ func (api objectAPIHandlers) ListenNotificationHandler(w http.ResponseWriter, r return rulesMap.MatchSimple(ev.EventName, ev.S3.Object.Key) }) if err != nil { - writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrSlowDown), r.URL) + writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL) return } if bucketName != "" { diff --git a/cmd/object-handlers.go b/cmd/object-handlers.go index f20dca22a..870e36bd8 100644 --- a/cmd/object-handlers.go +++ b/cmd/object-handlers.go @@ -662,10 +662,7 @@ func (api objectAPIHandlers) headObjectHandler(ctx context.Context, objectAPI Ob } } } - errCode := errorCodes.ToAPIErr(s3Error) - w.Header().Set(xMinIOErrCodeHeader, errCode.Code) - w.Header().Set(xMinIOErrDescHeader, "\""+errCode.Description+"\"") - writeErrorResponseHeadersOnly(w, errCode) + writeErrorResponseHeadersOnly(w, errorCodes.ToAPIErr(s3Error)) return } @@ -700,10 +697,7 @@ func (api objectAPIHandlers) headObjectHandler(ctx context.Context, objectAPI Ob } if s3Error := authorizeRequest(ctx, r, policy.GetObjectAction); s3Error != ErrNone { - errCode := errorCodes.ToAPIErr(s3Error) - w.Header().Set(xMinIOErrCodeHeader, errCode.Code) - w.Header().Set(xMinIOErrDescHeader, "\""+errCode.Description+"\"") - writeErrorResponseHeadersOnly(w, errCode) + writeErrorResponseHeadersOnly(w, errorCodes.ToAPIErr(s3Error)) return } diff --git a/cmd/storage-datatypes.go b/cmd/storage-datatypes.go index 9e6190684..8373c6bc3 100644 --- a/cmd/storage-datatypes.go +++ b/cmd/storage-datatypes.go @@ -265,7 +265,10 @@ func (fi FileInfo) Equals(ofi FileInfo) (ok bool) { if !fi.TransitionInfoEquals(ofi) { return false } - return fi.ModTime.Equal(ofi.ModTime) + if !fi.ModTime.Equal(ofi.ModTime) { + return false + } + return fi.Erasure.Equal(ofi.Erasure) } // GetDataDir returns an expected dataDir given FileInfo diff --git a/cmd/xl-storage-format-v1.go b/cmd/xl-storage-format-v1.go index 051680449..a9d0023f3 100644 --- a/cmd/xl-storage-format-v1.go +++ b/cmd/xl-storage-format-v1.go @@ -106,6 +106,38 @@ type ErasureInfo struct { Checksums []ChecksumInfo `json:"checksum,omitempty"` } +// Equal equates current erasure info with newer erasure info. +// returns false if one of the following check fails +// - erasure algorithm is different +// - data blocks are different +// - parity blocks are different +// - block size is different +// - distribution array size is different +// - distribution indexes are different +func (ei ErasureInfo) Equal(nei ErasureInfo) bool { + if ei.Algorithm != nei.Algorithm { + return false + } + if ei.DataBlocks != nei.DataBlocks { + return false + } + if ei.ParityBlocks != nei.ParityBlocks { + return false + } + if ei.BlockSize != nei.BlockSize { + return false + } + if len(ei.Distribution) != len(nei.Distribution) { + return false + } + for i, ecindex := range ei.Distribution { + if ecindex != nei.Distribution[i] { + return false + } + } + return true +} + // BitrotAlgorithm specifies a algorithm used for bitrot protection. type BitrotAlgorithm uint diff --git a/cmd/xl-storage.go b/cmd/xl-storage.go index f9726d7d6..6a57506d3 100644 --- a/cmd/xl-storage.go +++ b/cmd/xl-storage.go @@ -2139,9 +2139,15 @@ func (s *xlStorage) Delete(ctx context.Context, volume string, path string, dele } func skipAccessChecks(volume string) (ok bool) { - switch volume { - case minioMetaTmpBucket, minioMetaBucket, minioMetaMultipartBucket, minioMetaTmpDeletedBucket: - ok = true + for _, prefix := range []string{ + minioMetaTmpBucket, + minioMetaBucket, + minioMetaMultipartBucket, + minioMetaTmpDeletedBucket, + } { + if strings.HasPrefix(volume, prefix) { + return true + } } return ok } diff --git a/go.mod b/go.mod index d2c15f1b1..4856b25c7 100644 --- a/go.mod +++ b/go.mod @@ -49,7 +49,7 @@ require ( github.com/minio/highwayhash v1.0.2 github.com/minio/kes-go v0.1.0 github.com/minio/madmin-go/v2 v2.2.0 - github.com/minio/minio-go/v7 v7.0.57 + github.com/minio/minio-go/v7 v7.0.58-0.20230618181316-a73fe95ad965 github.com/minio/mux v1.9.0 github.com/minio/pkg v1.7.4 github.com/minio/selfupdate v0.6.0 diff --git a/go.sum b/go.sum index 642318ef1..e843ca1ff 100644 --- a/go.sum +++ b/go.sum @@ -792,8 +792,8 @@ github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= github.com/minio/minio-go/v6 v6.0.46/go.mod h1:qD0lajrGW49lKZLtXKtCB4X/qkMf0a5tBvN2PaZg7Gg= github.com/minio/minio-go/v7 v7.0.41/go.mod h1:nCrRzjoSUQh8hgKKtu3Y708OLvRLtuASMg2/nvmbarw= -github.com/minio/minio-go/v7 v7.0.57 h1:xsFiOiWjpC1XAGbFEUOzj1/gMXGz7ljfxifwcb/5YXU= -github.com/minio/minio-go/v7 v7.0.57/go.mod h1:NUDy4A4oXPq1l2yK6LTSvCEzAMeIcoz9lcj5dbzSrRE= +github.com/minio/minio-go/v7 v7.0.58-0.20230618181316-a73fe95ad965 h1:FWBzNlpXsqpkKlQhp3Sq/ONxFkAVPdxBC9CuzRF/4es= +github.com/minio/minio-go/v7 v7.0.58-0.20230618181316-a73fe95ad965/go.mod h1:NUDy4A4oXPq1l2yK6LTSvCEzAMeIcoz9lcj5dbzSrRE= github.com/minio/mux v1.9.0 h1:dWafQFyEfGhJvK6AwLOt83bIG5bxKxKJnKMCi0XAaoA= github.com/minio/mux v1.9.0/go.mod h1:1pAare17ZRL5GpmNL+9YmqHoWnLmMZF9C/ioUCfy0BQ= github.com/minio/pkg v1.5.4/go.mod h1:2MOaRFdmFKULD+uOLc3qHLGTQTuxCNPKNPfLBTxC8CA=