-
Notifications
You must be signed in to change notification settings - Fork 101
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-24247 Indexes created with table must be created in AVAILABLE state #5113
base: main
Are you sure you want to change the base?
Conversation
cc914e9
to
440313a
Compare
for (UpdateEntry updates : command.get(catalog)) { | ||
catalog = updates.applyUpdate(catalog, INITIAL_CAUSALITY_TOKEN); | ||
for (UpdateEntry updates : command.get(updateContext)) { | ||
updateContext = new UpdateContext(updates.applyUpdate(updateContext.catalog(), INITIAL_CAUSALITY_TOKEN)); |
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 don't reuse updateContext instance and call UpdateContext.updateCatalog()
instead of creating a new objectt.
int versionAfter = catalogManager.latestCatalogVersion(); | ||
assertThat(versionAfter, equalTo(versionBefore + 1)); |
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 guess, here we want to be sure index is not available for SQL in registered/building state.
So, we table and index should be created using separate catalog command commands.
However, your case fix make sense. Let's have both tests.
https://issues.apache.org/jira/browse/IGNITE-24247
UpdateContext
that holds a set of table ids.CreateTableCommand
, we add the table ID to the context.CreateIndexCommand
, we set the status of the index depending on whether there was a create table command for the corresponding table in the same batch.UpdateProducer
interface has changed.