[KV] - Replace RESOURCE_EXHAUSTED KV error with RESOURCE_OVERLOADED [kvl-1290] (#14014)

This commit is contained in:
Nicu Reut 2022-05-30 16:37:17 +02:00 committed by GitHub
parent 25b342240e
commit 2e1cc5c61b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 0 deletions

View File

@ -124,6 +124,8 @@ Errors that relate to system resources.
RESOURCE_EXHAUSTED
---------------------------------------------------------------------------------------------------------------------------------------
**Deprecation**: Replaced by RESOURCE_OVERLOADED. Since: 2.3.0
**Explanation**: A system resource has been exhausted.
**Category**: ContentionOnSharedResources
@ -134,6 +136,22 @@ RESOURCE_EXHAUSTED
.. _error_code_RESOURCE_OVERLOADED:
RESOURCE_OVERLOADED
---------------------------------------------------------------------------------------------------------------------------------------
**Explanation**: A system resource is overloaded.
**Category**: ContentionOnSharedResources
**Conveyance**: This error is logged with log-level INFO on the server side. This error is exposed on the API with grpc-status ABORTED including a detailed error message
**Resolution**: Retry the transaction submission or provide the details to the participant operator.
1.4. KvErrors / Time
===================================================================================================================

View File

@ -151,6 +151,7 @@ object KvErrors extends ErrorGroup()(ErrorGroups.rootErrorClass) {
@Resolution(
"Retry the transaction submission or provide the details to the participant operator."
)
@deprecated(since = "2.3.0", message = "Replaced by RESOURCE_OVERLOADED.")
object ResourceExhausted
extends ErrorCode(
id = "RESOURCE_EXHAUSTED",
@ -164,6 +165,23 @@ object KvErrors extends ErrorGroup()(ErrorGroups.rootErrorClass) {
)
}
@Explanation("A system resource is overloaded.")
@Resolution(
"Retry the transaction submission or provide the details to the participant operator."
)
object ResourceOverloaded
extends ErrorCode(
id = "RESOURCE_OVERLOADED",
ErrorCategory.ContentionOnSharedResources,
) {
case class Reject(
details: String
)(implicit loggingContext: ContextualizedErrorLogger)
extends KVLoggingTransactionErrorImpl(
cause = s"Resources overloaded: $details"
)
}
}
@Explanation("Errors that arise from an internal system misbehavior.")