This is an automated email from the ASF dual-hosted git repository.
tkalkirill pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git
The following commit(s) were added to refs/heads/main by this push:
new e66a33e016 IGNITE-23403 Remove Unused error codes (#4742)
e66a33e016 is described below
commit e66a33e01667daa28d9e09fccec479c963022034
Author: Kirill Tkalenko <[email protected]>
AuthorDate: Tue Nov 19 11:11:30 2024 +0300
IGNITE-23403 Remove Unused error codes (#4742)
---
.../java/org/apache/ignite/lang/ErrorGroups.java | 60 +++++++---------------
modules/platforms/cpp/ignite/common/error_codes.h | 44 +++++++---------
modules/platforms/cpp/ignite/odbc/common_types.cpp | 9 ----
.../platforms/dotnet/Apache.Ignite/ErrorCodes.g.cs | 60 +++++++---------------
4 files changed, 54 insertions(+), 119 deletions(-)
diff --git a/modules/api/src/main/java/org/apache/ignite/lang/ErrorGroups.java
b/modules/api/src/main/java/org/apache/ignite/lang/ErrorGroups.java
index 1e48973122..989c73008a 100755
--- a/modules/api/src/main/java/org/apache/ignite/lang/ErrorGroups.java
+++ b/modules/api/src/main/java/org/apache/ignite/lang/ErrorGroups.java
@@ -173,17 +173,11 @@ public class ErrorGroups {
/** Column not found. */
public static final int COLUMN_NOT_FOUND_ERR =
TABLE_ERR_GROUP.registerErrorCode((short) 4);
- /** Table is stopping. */
- public static final int TABLE_STOPPING_ERR =
TABLE_ERR_GROUP.registerErrorCode((short) 5);
-
- /** Table definition is incorrect. */
- public static final int TABLE_DEFINITION_ERR =
TABLE_ERR_GROUP.registerErrorCode((short) 6);
-
/** Schema version mismatch. */
- public static final int SCHEMA_VERSION_MISMATCH_ERR =
TABLE_ERR_GROUP.registerErrorCode((short) 7);
+ public static final int SCHEMA_VERSION_MISMATCH_ERR =
TABLE_ERR_GROUP.registerErrorCode((short) 5);
/** Unsupported partition type. */
- public static final int UNSUPPORTED_PARTITION_TYPE_ERR =
TABLE_ERR_GROUP.registerErrorCode((short) 8);
+ public static final int UNSUPPORTED_PARTITION_TYPE_ERR =
TABLE_ERR_GROUP.registerErrorCode((short) 6);
}
/** Client error group. */
@@ -204,23 +198,17 @@ public class ErrorGroups {
/** Table not found by ID. */
public static final int TABLE_ID_NOT_FOUND_ERR =
CLIENT_ERR_GROUP.registerErrorCode((short) 4);
- /** Authentication error. */
- public static final int AUTHENTICATION_ERR =
CLIENT_ERR_GROUP.registerErrorCode((short) 5);
-
- /** Authorization error. */
- public static final int AUTHORIZATION_ERR =
CLIENT_ERR_GROUP.registerErrorCode((short) 6);
-
/** Configuration error. */
- public static final int CONFIGURATION_ERR =
CLIENT_ERR_GROUP.registerErrorCode((short) 7);
+ public static final int CONFIGURATION_ERR =
CLIENT_ERR_GROUP.registerErrorCode((short) 5);
/** Cluster ID mismatch error. */
- public static final int CLUSTER_ID_MISMATCH_ERR =
CLIENT_ERR_GROUP.registerErrorCode((short) 8);
+ public static final int CLUSTER_ID_MISMATCH_ERR =
CLIENT_ERR_GROUP.registerErrorCode((short) 6);
/** Client SSL configuration error. */
- public static final int CLIENT_SSL_CONFIGURATION_ERR =
CLIENT_ERR_GROUP.registerErrorCode((short) 9);
+ public static final int CLIENT_SSL_CONFIGURATION_ERR =
CLIENT_ERR_GROUP.registerErrorCode((short) 7);
/** Client handshake header error. */
- public static final int HANDSHAKE_HEADER_ERR =
CLIENT_ERR_GROUP.registerErrorCode((short) 10);
+ public static final int HANDSHAKE_HEADER_ERR =
CLIENT_ERR_GROUP.registerErrorCode((short) 8);
}
/** SQL error group. */
@@ -316,14 +304,11 @@ public class ErrorGroups {
/** Index error group. */
public static final ErrorGroup INDEX_ERR_GROUP = registerGroup("IDX",
(short) 6);
- /** Invalid index definition. */
- public static final int INVALID_INDEX_DEFINITION_ERR =
INDEX_ERR_GROUP.registerErrorCode((short) 1);
-
/** Index not found. */
- public static final int INDEX_NOT_FOUND_ERR =
INDEX_ERR_GROUP.registerErrorCode((short) 2);
+ public static final int INDEX_NOT_FOUND_ERR =
INDEX_ERR_GROUP.registerErrorCode((short) 1);
/** Index already exists. */
- public static final int INDEX_ALREADY_EXISTS_ERR =
INDEX_ERR_GROUP.registerErrorCode((short) 3);
+ public static final int INDEX_ALREADY_EXISTS_ERR =
INDEX_ERR_GROUP.registerErrorCode((short) 2);
}
/** Transactions error group. */
@@ -356,26 +341,23 @@ public class ErrorGroups {
/** Failed to enlist read-write operation into read-only transaction.
*/
public static final int TX_FAILED_READ_WRITE_OPERATION_ERR =
TX_ERR_GROUP.registerErrorCode((short) 8);
- /** The error happens when the replica is not ready to handle a
request. */
- public static final int TX_REPLICA_UNAVAILABLE_ERR =
TX_ERR_GROUP.registerErrorCode((short) 9);
-
/** Tx state storage rebalancing error. */
- public static final int TX_STATE_STORAGE_REBALANCE_ERR =
TX_ERR_GROUP.registerErrorCode((short) 10);
+ public static final int TX_STATE_STORAGE_REBALANCE_ERR =
TX_ERR_GROUP.registerErrorCode((short) 9);
/** Error occurred when trying to create a read-only transaction with
a timestamp older than the data available in the tables. */
- public static final int TX_READ_ONLY_TOO_OLD_ERR =
TX_ERR_GROUP.registerErrorCode((short) 11);
+ public static final int TX_READ_ONLY_TOO_OLD_ERR =
TX_ERR_GROUP.registerErrorCode((short) 10);
/** Failure due to an incompatible schema change. */
- public static final int TX_INCOMPATIBLE_SCHEMA_ERR =
TX_ERR_GROUP.registerErrorCode((short) 12);
+ public static final int TX_INCOMPATIBLE_SCHEMA_ERR =
TX_ERR_GROUP.registerErrorCode((short) 11);
/** Failure due to primary replica expiration. */
- public static final int TX_PRIMARY_REPLICA_EXPIRED_ERR =
TX_ERR_GROUP.registerErrorCode((short) 13);
+ public static final int TX_PRIMARY_REPLICA_EXPIRED_ERR =
TX_ERR_GROUP.registerErrorCode((short) 12);
/** Operation failed because the transaction is already finished. */
- public static final int TX_ALREADY_FINISHED_ERR =
TX_ERR_GROUP.registerErrorCode((short) 14);
+ public static final int TX_ALREADY_FINISHED_ERR =
TX_ERR_GROUP.registerErrorCode((short) 13);
/** Failure due to a stale operation of a completed transaction is
detected. */
- public static final int TX_STALE_OPERATION_ERR =
TX_ERR_GROUP.registerErrorCode((short) 15);
+ public static final int TX_STALE_OPERATION_ERR =
TX_ERR_GROUP.registerErrorCode((short) 14);
}
/** Replicator error group. */
@@ -563,27 +545,21 @@ public class ErrorGroups {
/** Compute job failed. */
public static final int COMPUTE_JOB_FAILED_ERR =
COMPUTE_ERR_GROUP.registerErrorCode((short) 9);
- /** Cannot change job priority, compute job not found error. */
- public static final int CHANGE_JOB_PRIORITY_NO_JOB_ERR =
COMPUTE_ERR_GROUP.registerErrorCode((short) 10);
-
- /** Cannot change job priority, compute job is already executing. */
- public static final int CHANGE_JOB_PRIORITY_JOB_EXECUTING_ERR =
COMPUTE_ERR_GROUP.registerErrorCode((short) 11);
-
/** Cannot resolve primary replica for colocated execution. */
- public static final int PRIMARY_REPLICA_RESOLVE_ERR =
COMPUTE_ERR_GROUP.registerErrorCode((short) 12);
+ public static final int PRIMARY_REPLICA_RESOLVE_ERR =
COMPUTE_ERR_GROUP.registerErrorCode((short) 10);
/** Cannot change job priority. */
- public static final int CHANGE_JOB_PRIORITY_ERR =
COMPUTE_ERR_GROUP.registerErrorCode((short) 13);
+ public static final int CHANGE_JOB_PRIORITY_ERR =
COMPUTE_ERR_GROUP.registerErrorCode((short) 11);
/** Specified node is not found in the cluster. */
- public static final int NODE_NOT_FOUND_ERR =
COMPUTE_ERR_GROUP.registerErrorCode((short) 14);
+ public static final int NODE_NOT_FOUND_ERR =
COMPUTE_ERR_GROUP.registerErrorCode((short) 12);
/**
* Incompatible types for argument/result in compute job.
* For example, the one has defined a marshaller for Type A in the
compute job
* but on the client side they have passed Type B.
*/
- public static final int MARSHALLING_TYPE_MISMATCH_ERR =
COMPUTE_ERR_GROUP.registerErrorCode((short) 15);
+ public static final int MARSHALLING_TYPE_MISMATCH_ERR =
COMPUTE_ERR_GROUP.registerErrorCode((short) 13);
}
/** Catalog error group. */
diff --git a/modules/platforms/cpp/ignite/common/error_codes.h
b/modules/platforms/cpp/ignite/common/error_codes.h
index 32f19740ec..16459471f6 100644
--- a/modules/platforms/cpp/ignite/common/error_codes.h
+++ b/modules/platforms/cpp/ignite/common/error_codes.h
@@ -78,22 +78,18 @@ enum class code : underlying_t {
TABLE_NOT_FOUND = 0x20002,
COLUMN_ALREADY_EXISTS = 0x20003,
COLUMN_NOT_FOUND = 0x20004,
- TABLE_STOPPING = 0x20005,
- TABLE_DEFINITION = 0x20006,
- SCHEMA_VERSION_MISMATCH = 0x20007,
- UNSUPPORTED_PARTITION_TYPE = 0x20008,
+ SCHEMA_VERSION_MISMATCH = 0x20005,
+ UNSUPPORTED_PARTITION_TYPE = 0x20006,
// Client group. Group code: 3
CONNECTION = 0x30001,
PROTOCOL = 0x30002,
PROTOCOL_COMPATIBILITY = 0x30003,
TABLE_ID_NOT_FOUND = 0x30004,
- AUTHENTICATION = 0x30005,
- AUTHORIZATION = 0x30006,
- CONFIGURATION = 0x30007,
- CLUSTER_ID_MISMATCH = 0x30008,
- CLIENT_SSL_CONFIGURATION = 0x30009,
- HANDSHAKE_HEADER = 0x3000a,
+ CONFIGURATION = 0x30005,
+ CLUSTER_ID_MISMATCH = 0x30006,
+ CLIENT_SSL_CONFIGURATION = 0x30007,
+ HANDSHAKE_HEADER = 0x30008,
// Sql group. Group code: 4
QUERY_NO_RESULT_SET = 0x40001,
@@ -116,9 +112,8 @@ enum class code : underlying_t {
DIVERGED = 0x50007,
// Index group. Group code: 6
- INVALID_INDEX_DEFINITION = 0x60001,
- INDEX_NOT_FOUND = 0x60002,
- INDEX_ALREADY_EXISTS = 0x60003,
+ INDEX_NOT_FOUND = 0x60001,
+ INDEX_ALREADY_EXISTS = 0x60002,
// Transactions group. Group code: 7
TX_STATE_STORAGE = 0x70001,
@@ -129,13 +124,12 @@ enum class code : underlying_t {
TX_COMMIT = 0x70006,
TX_ROLLBACK = 0x70007,
TX_FAILED_READ_WRITE_OPERATION = 0x70008,
- TX_REPLICA_UNAVAILABLE = 0x70009,
- TX_STATE_STORAGE_REBALANCE = 0x7000a,
- TX_READ_ONLY_TOO_OLD = 0x7000b,
- TX_INCOMPATIBLE_SCHEMA = 0x7000c,
- TX_PRIMARY_REPLICA_EXPIRED = 0x7000d,
- TX_ALREADY_FINISHED = 0x7000e,
- TX_STALE_OPERATION = 0x7000f,
+ TX_STATE_STORAGE_REBALANCE = 0x70009,
+ TX_READ_ONLY_TOO_OLD = 0x7000a,
+ TX_INCOMPATIBLE_SCHEMA = 0x7000b,
+ TX_PRIMARY_REPLICA_EXPIRED = 0x7000c,
+ TX_ALREADY_FINISHED = 0x7000d,
+ TX_STALE_OPERATION = 0x7000e,
// Replicator group. Group code: 8
REPLICA_COMMON = 0x80001,
@@ -193,12 +187,10 @@ enum class code : underlying_t {
RESULT_NOT_FOUND = 0x100007,
FAIL_TO_GET_JOB_STATE = 0x100008,
COMPUTE_JOB_FAILED = 0x100009,
- CHANGE_JOB_PRIORITY_NO_JOB = 0x10000a,
- CHANGE_JOB_PRIORITY_JOB_EXECUTING = 0x10000b,
- PRIMARY_REPLICA_RESOLVE = 0x10000c,
- CHANGE_JOB_PRIORITY = 0x10000d,
- NODE_NOT_FOUND = 0x10000e,
- MARSHALLING_TYPE_MISMATCH = 0x10000f,
+ PRIMARY_REPLICA_RESOLVE = 0x10000a,
+ CHANGE_JOB_PRIORITY = 0x10000b,
+ NODE_NOT_FOUND = 0x10000c,
+ MARSHALLING_TYPE_MISMATCH = 0x10000d,
// Catalog group. Group code: 17
VALIDATION = 0x110001,
diff --git a/modules/platforms/cpp/ignite/odbc/common_types.cpp
b/modules/platforms/cpp/ignite/odbc/common_types.cpp
index 981b07b33b..69e586e445 100644
--- a/modules/platforms/cpp/ignite/odbc/common_types.cpp
+++ b/modules/platforms/cpp/ignite/odbc/common_types.cpp
@@ -134,8 +134,6 @@ sql_state error_code_to_sql_state(error::code code) {
return sql_state::S42S21_COLUMN_ALREADY_EXISTS;
case error::code::COLUMN_NOT_FOUND:
return sql_state::S42S22_COLUMN_NOT_FOUND;
- case error::code::TABLE_STOPPING:
- case error::code::TABLE_DEFINITION:
case error::code::SCHEMA_VERSION_MISMATCH:
case error::code::UNSUPPORTED_PARTITION_TYPE:
return sql_state::SHY000_GENERAL_ERROR;
@@ -147,8 +145,6 @@ sql_state error_code_to_sql_state(error::code code) {
return sql_state::S08001_CANNOT_CONNECT;
case error::code::TABLE_ID_NOT_FOUND:
return sql_state::S42S02_TABLE_OR_VIEW_NOT_FOUND;
- case error::code::AUTHENTICATION:
- case error::code::AUTHORIZATION:
case error::code::CONFIGURATION:
case error::code::CLUSTER_ID_MISMATCH:
case error::code::CLIENT_SSL_CONFIGURATION:
@@ -190,8 +186,6 @@ sql_state error_code_to_sql_state(error::code code) {
return sql_state::S42S12_INDEX_NOT_FOUND;
case error::code::INDEX_ALREADY_EXISTS:
return sql_state::S42S11_INDEX_ALREADY_EXISTS;
- case error::code::INVALID_INDEX_DEFINITION:
- return sql_state::SHY000_GENERAL_ERROR;
// Transactions group. Group code: 7
case error::code::TX_STATE_STORAGE:
@@ -202,7 +196,6 @@ sql_state error_code_to_sql_state(error::code code) {
case error::code::TX_COMMIT:
case error::code::TX_ROLLBACK:
case error::code::TX_FAILED_READ_WRITE_OPERATION:
- case error::code::TX_REPLICA_UNAVAILABLE:
case error::code::TX_STATE_STORAGE_REBALANCE:
case error::code::TX_READ_ONLY_TOO_OLD:
case error::code::TX_INCOMPATIBLE_SCHEMA:
@@ -277,9 +270,7 @@ sql_state error_code_to_sql_state(error::code code) {
case error::code::RESULT_NOT_FOUND:
case error::code::FAIL_TO_GET_JOB_STATE:
case error::code::COMPUTE_JOB_FAILED:
- case error::code::CHANGE_JOB_PRIORITY_NO_JOB:
case error::code::PRIMARY_REPLICA_RESOLVE:
- case error::code::CHANGE_JOB_PRIORITY_JOB_EXECUTING:
case error::code::CHANGE_JOB_PRIORITY:
case error::code::NODE_NOT_FOUND:
return sql_state::SHY000_GENERAL_ERROR;
diff --git a/modules/platforms/dotnet/Apache.Ignite/ErrorCodes.g.cs
b/modules/platforms/dotnet/Apache.Ignite/ErrorCodes.g.cs
index f9b7d3e206..22cd196a36 100644
--- a/modules/platforms/dotnet/Apache.Ignite/ErrorCodes.g.cs
+++ b/modules/platforms/dotnet/Apache.Ignite/ErrorCodes.g.cs
@@ -116,17 +116,11 @@ namespace Apache.Ignite
/// <summary> ColumnNotFound error. </summary>
public const int ColumnNotFound = (GroupCode << 16) | (4 & 0xFFFF);
- /// <summary> TableStopping error. </summary>
- public const int TableStopping = (GroupCode << 16) | (5 & 0xFFFF);
-
- /// <summary> TableDefinition error. </summary>
- public const int TableDefinition = (GroupCode << 16) | (6 &
0xFFFF);
-
/// <summary> SchemaVersionMismatch error. </summary>
- public const int SchemaVersionMismatch = (GroupCode << 16) | (7 &
0xFFFF);
+ public const int SchemaVersionMismatch = (GroupCode << 16) | (5 &
0xFFFF);
/// <summary> UnsupportedPartitionType error. </summary>
- public const int UnsupportedPartitionType = (GroupCode << 16) | (8
& 0xFFFF);
+ public const int UnsupportedPartitionType = (GroupCode << 16) | (6
& 0xFFFF);
}
/// <summary> Client errors. </summary>
@@ -150,23 +144,17 @@ namespace Apache.Ignite
/// <summary> TableIdNotFound error. </summary>
public const int TableIdNotFound = (GroupCode << 16) | (4 &
0xFFFF);
- /// <summary> Authentication error. </summary>
- public const int Authentication = (GroupCode << 16) | (5 & 0xFFFF);
-
- /// <summary> Authorization error. </summary>
- public const int Authorization = (GroupCode << 16) | (6 & 0xFFFF);
-
/// <summary> Configuration error. </summary>
- public const int Configuration = (GroupCode << 16) | (7 & 0xFFFF);
+ public const int Configuration = (GroupCode << 16) | (5 & 0xFFFF);
/// <summary> ClusterIdMismatch error. </summary>
- public const int ClusterIdMismatch = (GroupCode << 16) | (8 &
0xFFFF);
+ public const int ClusterIdMismatch = (GroupCode << 16) | (6 &
0xFFFF);
/// <summary> ClientSslConfiguration error. </summary>
- public const int ClientSslConfiguration = (GroupCode << 16) | (9 &
0xFFFF);
+ public const int ClientSslConfiguration = (GroupCode << 16) | (7 &
0xFFFF);
/// <summary> HandshakeHeader error. </summary>
- public const int HandshakeHeader = (GroupCode << 16) | (10 &
0xFFFF);
+ public const int HandshakeHeader = (GroupCode << 16) | (8 &
0xFFFF);
}
/// <summary> Sql errors. </summary>
@@ -246,14 +234,11 @@ namespace Apache.Ignite
/// <summary> Index group name. </summary>
public const String GroupName = "IDX";
- /// <summary> InvalidIndexDefinition error. </summary>
- public const int InvalidIndexDefinition = (GroupCode << 16) | (1 &
0xFFFF);
-
/// <summary> IndexNotFound error. </summary>
- public const int IndexNotFound = (GroupCode << 16) | (2 & 0xFFFF);
+ public const int IndexNotFound = (GroupCode << 16) | (1 & 0xFFFF);
/// <summary> IndexAlreadyExists error. </summary>
- public const int IndexAlreadyExists = (GroupCode << 16) | (3 &
0xFFFF);
+ public const int IndexAlreadyExists = (GroupCode << 16) | (2 &
0xFFFF);
}
/// <summary> Transactions errors. </summary>
@@ -289,26 +274,23 @@ namespace Apache.Ignite
/// <summary> TxFailedReadWriteOperation error. </summary>
public const int TxFailedReadWriteOperation = (GroupCode << 16) |
(8 & 0xFFFF);
- /// <summary> TxReplicaUnavailable error. </summary>
- public const int TxReplicaUnavailable = (GroupCode << 16) | (9 &
0xFFFF);
-
/// <summary> TxStateStorageRebalance error. </summary>
- public const int TxStateStorageRebalance = (GroupCode << 16) | (10
& 0xFFFF);
+ public const int TxStateStorageRebalance = (GroupCode << 16) | (9
& 0xFFFF);
/// <summary> TxReadOnlyTooOld error. </summary>
- public const int TxReadOnlyTooOld = (GroupCode << 16) | (11 &
0xFFFF);
+ public const int TxReadOnlyTooOld = (GroupCode << 16) | (10 &
0xFFFF);
/// <summary> TxIncompatibleSchema error. </summary>
- public const int TxIncompatibleSchema = (GroupCode << 16) | (12 &
0xFFFF);
+ public const int TxIncompatibleSchema = (GroupCode << 16) | (11 &
0xFFFF);
/// <summary> TxPrimaryReplicaExpired error. </summary>
- public const int TxPrimaryReplicaExpired = (GroupCode << 16) | (13
& 0xFFFF);
+ public const int TxPrimaryReplicaExpired = (GroupCode << 16) | (12
& 0xFFFF);
/// <summary> TxAlreadyFinished error. </summary>
- public const int TxAlreadyFinished = (GroupCode << 16) | (14 &
0xFFFF);
+ public const int TxAlreadyFinished = (GroupCode << 16) | (13 &
0xFFFF);
/// <summary> TxStaleOperation error. </summary>
- public const int TxStaleOperation = (GroupCode << 16) | (15 &
0xFFFF);
+ public const int TxStaleOperation = (GroupCode << 16) | (14 &
0xFFFF);
}
/// <summary> Replicator errors. </summary>
@@ -517,23 +499,17 @@ namespace Apache.Ignite
/// <summary> ComputeJobFailed error. </summary>
public const int ComputeJobFailed = (GroupCode << 16) | (9 &
0xFFFF);
- /// <summary> ChangeJobPriorityNoJob error. </summary>
- public const int ChangeJobPriorityNoJob = (GroupCode << 16) | (10
& 0xFFFF);
-
- /// <summary> ChangeJobPriorityJobExecuting error. </summary>
- public const int ChangeJobPriorityJobExecuting = (GroupCode << 16)
| (11 & 0xFFFF);
-
/// <summary> PrimaryReplicaResolve error. </summary>
- public const int PrimaryReplicaResolve = (GroupCode << 16) | (12 &
0xFFFF);
+ public const int PrimaryReplicaResolve = (GroupCode << 16) | (10 &
0xFFFF);
/// <summary> ChangeJobPriority error. </summary>
- public const int ChangeJobPriority = (GroupCode << 16) | (13 &
0xFFFF);
+ public const int ChangeJobPriority = (GroupCode << 16) | (11 &
0xFFFF);
/// <summary> NodeNotFound error. </summary>
- public const int NodeNotFound = (GroupCode << 16) | (14 & 0xFFFF);
+ public const int NodeNotFound = (GroupCode << 16) | (12 & 0xFFFF);
/// <summary> MarshallingTypeMismatch error. </summary>
- public const int MarshallingTypeMismatch = (GroupCode << 16) | (15
& 0xFFFF);
+ public const int MarshallingTypeMismatch = (GroupCode << 16) | (13
& 0xFFFF);
}
/// <summary> Catalog errors. </summary>