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

[jira] [Updated] (IGNITE-16044) Configuration should provide a revision after a change is completed

     [ https://issues.apache.org/jira/browse/IGNITE-16044?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mirza Aliev updated IGNITE-16044:
---------------------------------
    Summary: Configuration should provide a revision after a change is completed  (was: Configuration should provide a revision after a change completed)

> Configuration should provide a revision after a change is completed
> -------------------------------------------------------------------
>
>                 Key: IGNITE-16044
>                 URL: https://issues.apache.org/jira/browse/IGNITE-16044
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Vladislav Pyatkov
>            Priority: Major
>              Labels: ignite-3
>
> 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<Long> update(VIEWT change);
> {code}
> After a change applied, the associated revision will be available, and the same revision is available when Metastorage notifies the handler through a configuration listener.
> {code:title=ConfigurationNotificationEvent.java}
> /**
>  * Returns monotonously increasing counter, linked to the specific storage for current configuration values. Gives a unique change
>  * identifier inside a specific configuration storage.
>  *
>  * @return Counter value.
>  */
> long storageRevision();
> {code}
>  



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