-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IGNITE-16266 Add unique id for indexes #672
Conversation
d3c0e98
to
c08a2e7
Compare
9f9202d
to
870fa15
Compare
c08a2e7
to
4a4e4e7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @AMashenkov! What about SQL-related part? We need to fix that as well. You could use patch from this ticket as reference.
...es/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/rel/AbstractIndexScan.java
Outdated
Show resolved
Hide resolved
...ql-engine/src/main/java/org/apache/ignite/internal/sql/engine/externalize/RelJsonReader.java
Outdated
Show resolved
Hide resolved
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/schema/IgniteIndex.java
Outdated
Show resolved
Hide resolved
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/schema/IgniteIndex.java
Outdated
Show resolved
Hide resolved
* @param idxName Index name. | ||
* @throws IndexNotFoundException If not found. | ||
*/ | ||
void checkIndexById(String tag, String idxName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need a idxName
param here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fix RelInputImpl#checkIndexById method, my fail, name needed only for possible error message.
modules/index-api/src/main/java/org/apache/ignite/internal/idx/IndexManager.java
Outdated
Show resolved
Hide resolved
...s/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/externalize/RelInputEx.java
Outdated
Show resolved
Hide resolved
...s/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/externalize/RelInputEx.java
Show resolved
Hide resolved
...es/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/rel/AbstractIndexScan.java
Show resolved
Hide resolved
InternalSortedIndex idx = indexManager.getIndexById(id); | ||
|
||
if (idx == null) { | ||
throw new IndexNotFoundException(idxName, id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem right to pass an idxName
param only for case when index is not found. Probably, there should be one more constructor of IndexNotFoundException
accepting the Id
only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refactored here.
...ngine/src/test/java/org/apache/ignite/internal/sql/engine/externalize/RelJsonReaderTest.java
Outdated
Show resolved
Hide resolved
.../sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/schema/SqlSchemaManager.java
Outdated
Show resolved
Hide resolved
...-engine/src/main/java/org/apache/ignite/internal/sql/engine/schema/SqlSchemaManagerImpl.java
Outdated
Show resolved
Hide resolved
...ngine/src/test/java/org/apache/ignite/internal/sql/engine/externalize/RelJsonReaderTest.java
Outdated
Show resolved
Hide resolved
...ngine/src/test/java/org/apache/ignite/internal/sql/engine/externalize/RelJsonReaderTest.java
Outdated
Show resolved
Hide resolved
...ngine/src/test/java/org/apache/ignite/internal/sql/engine/externalize/RelJsonReaderTest.java
Outdated
Show resolved
Hide resolved
...s/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/externalize/RelInputEx.java
Show resolved
Hide resolved
IgniteIndex old = indexById.remove(idx0.id()); | ||
|
||
if (old == null) { | ||
LOG.trace(IgniteStringFormatter.format("Index [name={}] not found in inner store.", idxName)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's avoid string creation if the TRACE log-level is disabled.
LOG.trace(IgniteStringFormatter.format("Index [name={}] not found in inner store.", idxName)); | |
LOG.trace(() -> IgniteStringFormatter.format("Index [name={}] not found in inner store.", idxName)); |
https://issues.apache.org/jira/browse/IGNITE-16266