[
https://issues.apache.org/jira/browse/IGNITE-16763?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Denis Chudov updated IGNITE-16763:
----------------------------------
Description:
Scenario:
Start a node, try to create a table. Inside of TableManager the listener
onTableCreate is successfully executed. Then, an exception happens inside of
TableManager#updateAssignments configuration listener, which is triggered after
the completion of onTableCreate listener.
Expected behavior:
There is no operational instance of the newly created table on the node that
initiated creation of the table, because updateAssignments had failed. "Create
table" operation should fail with exception.
Actual:
"Create table" operation succeeds, as onTableCreate had succeeded.
Suggested fix:
updateAssignments should save exception to versioned values in TableManager, as
it updates these versioned values. Thus, the following VersionedValue#get will
throw an exception, and table creation future will be completed exceptionally
(see TableManager#completeApiCreateFuture ). However, we should think about how
further updates of these versioned values will happen.
was:
Scenario:
Start a node, try to create a table. Inside of TableManager the listener
onTableCreate is successfully executed. Then, an exception happens inside of
TableManager#updateAssignments configuration listener, which is triggered after
the completion of onTableCreate listener.
Expected behavior:
There is no operational instance of the newly created table on the node that
initiated creation of the table, because updateAssignments had failed. "Create
table" operation should fail with exception.
Actual:
"Create table" operation succeeds, as onTableCreate had succeeded.
Proposed fix:
For now, there is no way to complete the table create future exceptionally if
exception was thrown in the listener of configuration updates, so that the
table hasn't been actually created. For example, exception is thrown inside of
TableManager#updateAssignments. Table creation completes anyway, as it depends
only on update of versioned values in table manager, which will be completed in
any case on storage revision update, and then the table creation future will be
completed successfully.
> TableManager doesn't throw exception on table create, if something goes wrong
> in configuration listener for updateAssignments
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: IGNITE-16763
> URL: https://issues.apache.org/jira/browse/IGNITE-16763
> Project: Ignite
> Issue Type: Bug
> Reporter: Denis Chudov
> Priority: Major
> Labels: ignite-3
>
> Scenario:
> Start a node, try to create a table. Inside of TableManager the listener
> onTableCreate is successfully executed. Then, an exception happens inside of
> TableManager#updateAssignments configuration listener, which is triggered
> after the completion of onTableCreate listener.
> Expected behavior:
> There is no operational instance of the newly created table on the node that
> initiated creation of the table, because updateAssignments had failed.
> "Create table" operation should fail with exception.
> Actual:
> "Create table" operation succeeds, as onTableCreate had succeeded.
> Suggested fix:
> updateAssignments should save exception to versioned values in TableManager,
> as it updates these versioned values. Thus, the following VersionedValue#get
> will throw an exception, and table creation future will be completed
> exceptionally (see TableManager#completeApiCreateFuture ). However, we should
> think about how further updates of these versioned values will happen.
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)