Skip to content

Commit a520d92

Browse files
tanjialiangamitkdutta
authored andcommitted
Add new memory arbitration failure error code name
1 parent 7cdf95b commit a520d92

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

presto-native-execution/presto_cpp/main/common/Exception.h

+15-1
Original file line numberDiff line numberDiff line change
@@ -50,57 +50,71 @@ class VeloxToPrestoExceptionTranslator {
5050
{0x00020007,
5151
"EXCEEDED_LOCAL_MEMORY_LIMIT",
5252
protocol::ErrorType::INSUFFICIENT_RESOURCES}},
53+
5354
{velox::error_code::kMemAborted,
5455
{0x00020000,
5556
"GENERIC_INSUFFICIENT_RESOURCES",
5657
protocol::ErrorType::INSUFFICIENT_RESOURCES}},
58+
5759
{velox::error_code::kSpillLimitExceeded,
5860
{0x00020006,
5961
"EXCEEDED_SPILL_LIMIT",
6062
protocol::ErrorType::INSUFFICIENT_RESOURCES}},
63+
6164
{velox::error_code::kMemArbitrationFailure,
6265
{0x00020000,
63-
"GENERIC_INSUFFICIENT_RESOURCES",
66+
"MEMORY_ARBITRATION_FAILURE",
6467
protocol::ErrorType::INSUFFICIENT_RESOURCES}},
68+
6569
{velox::error_code::kMemArbitrationTimeout,
6670
{0x00020000,
6771
"GENERIC_INSUFFICIENT_RESOURCES",
6872
protocol::ErrorType::INSUFFICIENT_RESOURCES}},
73+
6974
{velox::error_code::kMemAllocError,
7075
{0x00020000,
7176
"GENERIC_INSUFFICIENT_RESOURCES",
7277
protocol::ErrorType::INSUFFICIENT_RESOURCES}},
78+
7379
{velox::error_code::kInvalidState,
7480
{0x00010000,
7581
"GENERIC_INTERNAL_ERROR",
7682
protocol::ErrorType::INTERNAL_ERROR}},
83+
7784
{velox::error_code::kGenericSpillFailure,
7885
{0x00010023,
7986
"GENERIC_SPILL_FAILURE",
8087
protocol::ErrorType::INTERNAL_ERROR}},
88+
8189
{velox::error_code::kUnreachableCode,
8290
{0x00010000,
8391
"GENERIC_INTERNAL_ERROR",
8492
protocol::ErrorType::INTERNAL_ERROR}},
93+
8594
{velox::error_code::kNotImplemented,
8695
{0x00010000,
8796
"GENERIC_INTERNAL_ERROR",
8897
protocol::ErrorType::INTERNAL_ERROR}},
98+
8999
{velox::error_code::kUnknown,
90100
{0x00010000,
91101
"GENERIC_INTERNAL_ERROR",
92102
protocol::ErrorType::INTERNAL_ERROR}}}},
103+
93104
{velox::error_source::kErrorSourceUser,
94105
{{velox::error_code::kInvalidArgument,
95106
{0x00000000,
96107
"GENERIC_USER_ERROR",
97108
protocol::ErrorType::USER_ERROR}},
109+
98110
{velox::error_code::kUnsupported,
99111
{0x0000000D, "NOT_SUPPORTED", protocol::ErrorType::USER_ERROR}},
112+
100113
{velox::error_code::kArithmeticError,
101114
{0x00000000,
102115
"GENERIC_USER_ERROR",
103116
protocol::ErrorType::USER_ERROR}}}},
117+
104118
{velox::error_source::kErrorSourceSystem, {}}};
105119
return kTranslateMap;
106120
}

presto-spi/src/main/java/com/facebook/presto/spi/StandardErrorCode.java

+1
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ public enum StandardErrorCode
144144
NO_CPP_SIDECARS(0x0002_0014, INTERNAL_ERROR),
145145
HEADER_MODIFICATION_ATTEMPT(0x0002_0015, INTERNAL_ERROR),
146146
DUPLICATE_FUNCTION_ERROR(0x0002_0016, INTERNAL_ERROR),
147+
MEMORY_ARBITRATION_FAILURE(0x0002_0017, INSUFFICIENT_RESOURCES),
147148
/**/;
148149

149150
// Error code range 0x0003 is reserved for Presto-on-Spark

0 commit comments

Comments
 (0)