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 6cb005b220 IGNITE-22039 Getting rid of InconsistentIndexStateException 
for SortedIndexStorage#tolerantScan (#3674)
6cb005b220 is described below

commit 6cb005b2202bd3bd4c31e021527fd2bf7f08823a
Author: Kirill Tkalenko <[email protected]>
AuthorDate: Sat Apr 27 09:23:32 2024 +0300

    IGNITE-22039 Getting rid of InconsistentIndexStateException for 
SortedIndexStorage#tolerantScan (#3674)
---
 .../java/org/apache/ignite/lang/ErrorGroups.java   |  3 --
 modules/platforms/cpp/ignite/common/error_codes.h  |  1 -
 modules/platforms/cpp/ignite/odbc/common_types.cpp |  1 -
 .../platforms/dotnet/Apache.Ignite/ErrorCodes.g.cs |  3 --
 .../index/InconsistentIndexStateException.java     | 39 ----------------------
 .../internal/storage/index/SortedIndexStorage.java |  2 --
 6 files changed, 49 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 3320d05a2c..e61a7e136b 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
@@ -420,9 +420,6 @@ public class ErrorGroups {
 
         /** Error reading from an index that has not yet been built. */
         public static final int INDEX_NOT_BUILT_ERR = 
STORAGE_ERR_GROUP.registerErrorCode((short) 6);
-
-        /** Error when detecting an inconsistent index state. */
-        public static final int INCONSISTENT_INDEX_STATE_ERR = 
STORAGE_ERR_GROUP.registerErrorCode((short) 7);
     }
 
     /** Distribution zones error group. */
diff --git a/modules/platforms/cpp/ignite/common/error_codes.h 
b/modules/platforms/cpp/ignite/common/error_codes.h
index 39c777828f..f728001528 100644
--- a/modules/platforms/cpp/ignite/common/error_codes.h
+++ b/modules/platforms/cpp/ignite/common/error_codes.h
@@ -148,7 +148,6 @@ enum class code : underlying_t {
     STORAGE_REBALANCE = 0x90004,
     ALREADY_DESTROYED = 0x90005,
     INDEX_NOT_BUILT = 0x90006,
-    INCONSISTENT_INDEX_STATE = 0x90007,
 
     // DistributionZones group. Group code: 10
     ZONE_NOT_FOUND = 0xa0001,
diff --git a/modules/platforms/cpp/ignite/odbc/common_types.cpp 
b/modules/platforms/cpp/ignite/odbc/common_types.cpp
index 2a7a4f265d..6cdb6863d8 100644
--- a/modules/platforms/cpp/ignite/odbc/common_types.cpp
+++ b/modules/platforms/cpp/ignite/odbc/common_types.cpp
@@ -228,7 +228,6 @@ sql_state error_code_to_sql_state(error::code code) {
         case error::code::STORAGE_REBALANCE:
         case error::code::ALREADY_DESTROYED:
         case error::code::INDEX_NOT_BUILT:
-        case error::code::INCONSISTENT_INDEX_STATE:
             return sql_state::SHY000_GENERAL_ERROR;
 
         // DistributionZones group. Group code: 10
diff --git a/modules/platforms/dotnet/Apache.Ignite/ErrorCodes.g.cs 
b/modules/platforms/dotnet/Apache.Ignite/ErrorCodes.g.cs
index 9d979cf798..1a55aa4850 100644
--- a/modules/platforms/dotnet/Apache.Ignite/ErrorCodes.g.cs
+++ b/modules/platforms/dotnet/Apache.Ignite/ErrorCodes.g.cs
@@ -359,9 +359,6 @@ namespace Apache.Ignite
 
             /// <summary> IndexNotBuilt error. </summary>
             public const int IndexNotBuilt = (GroupCode << 16) | (6 & 0xFFFF);
-
-            /// <summary> InconsistentIndexState error. </summary>
-            public const int InconsistentIndexState = (GroupCode << 16) | (7 & 
0xFFFF);
         }
 
         /// <summary> DistributionZones errors. </summary>
diff --git 
a/modules/storage-api/src/main/java/org/apache/ignite/internal/storage/index/InconsistentIndexStateException.java
 
b/modules/storage-api/src/main/java/org/apache/ignite/internal/storage/index/InconsistentIndexStateException.java
deleted file mode 100644
index 423c215d66..0000000000
--- 
a/modules/storage-api/src/main/java/org/apache/ignite/internal/storage/index/InconsistentIndexStateException.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.storage.index;
-
-import static 
org.apache.ignite.lang.ErrorGroups.Storage.INCONSISTENT_INDEX_STATE_ERR;
-
-import org.apache.ignite.internal.lang.IgniteStringFormatter;
-import org.apache.ignite.internal.storage.StorageException;
-
-/** Exception that occurs when an index is not consistent, for example, when 
reading from a readable index and it has not yet been built. */
-public class InconsistentIndexStateException extends StorageException {
-    private static final long serialVersionUID = 344560487657914429L;
-
-    /**
-     * Constructor.
-     *
-     * @param messagePattern Error message pattern.
-     * @param params Error message params.
-     * @see IgniteStringFormatter#format(String, Object...)
-     */
-    public InconsistentIndexStateException(String messagePattern, Object... 
params) {
-        super(INCONSISTENT_INDEX_STATE_ERR, messagePattern, params);
-    }
-}
diff --git 
a/modules/storage-api/src/main/java/org/apache/ignite/internal/storage/index/SortedIndexStorage.java
 
b/modules/storage-api/src/main/java/org/apache/ignite/internal/storage/index/SortedIndexStorage.java
index 17712c0254..86057b5984 100644
--- 
a/modules/storage-api/src/main/java/org/apache/ignite/internal/storage/index/SortedIndexStorage.java
+++ 
b/modules/storage-api/src/main/java/org/apache/ignite/internal/storage/index/SortedIndexStorage.java
@@ -104,9 +104,7 @@ public interface SortedIndexStorage extends IndexStorage {
      * @return Cursor with fetched index rows.
      * @throws IllegalArgumentException If backwards flag is passed and 
backwards iteration is not supported by the storage.
      * @throws StorageException If failed to read data.
-     * @throws InconsistentIndexStateException If the index is in a readable 
status, but the index is not built.
      */
-    // TODO: IGNITE-22039 Implement throw an InconsistentIndexStateException 
if the index is not in a readable status and write tests
     PeekCursor<IndexRow> tolerantScan(
             @Nullable BinaryTuplePrefix lowerBound,
             @Nullable BinaryTuplePrefix upperBound,

Reply via email to