You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vladislav Pyatkov (Jira)" <ji...@apache.org> on 2021/12/02 11:41:00 UTC

[jira] [Created] (IGNITE-16044) Configuration should provide a revision after a cahnge complited

Vladislav Pyatkov created IGNITE-16044:
------------------------------------------

             Summary: Configuration should provide a revision after a cahnge complited
                 Key: IGNITE-16044
                 URL: https://issues.apache.org/jira/browse/IGNITE-16044
             Project: Ignite
          Issue Type: Improvement
            Reporter: Vladislav Pyatkov


Today we faced with issue where we cannot distinguish which an operation is completed on Metastorage notification.

Several asynchronous updates over one table are initiated, but which of them completed when Metastorage gives an information about update the table is not clear. Currently, we compete all active operations when the even one notification received. It is obviously wrong.

For solving the issue, Configuration should return a Metastorage revision number where the change is completed:

{code:title=ConfigurationTree.java}

/**
* Changes this configuration node value.
*
* @param change CHANGE object.
* @return Future that is completed when configuration change is finished either successfully or not. If the change finished successfully, the future will contain a revision that corresponds to the change and will get in notification {@link ConfigurationNotificationEvent#storageRevision}.
*/
CompletableFuture<Long> change(Consumer<CHANGET> change);

{code}

{code:title=ConfigurationValue.java}
/**
     * Update this configuration node value.
     *
     * @param change New value for the configuration. Must not be null.
     * @return Future that signifies end of the update operation. Can also be completed with {@link ConfigurationValidationException} and
     *      {@link ConfigurationChangeException}. If the change finished successfully, the future will contain a revision that corresponds to the change and will get in notification {@link ConfigurationNotificationEvent#storageRevision}.
     */
    CompletableFuture<Void> update(VIEWT change);
{code}
 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)