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

Alexander Lapin updated IGNITE-19532:
-------------------------------------
    Description: 
h3. Motivation

Let's assume that we have a component named LeaseTracker that locally stores 
leases in a map though meta storage updates
{code:java}
public class LeaseTracker implements PlacementDriver {
/** Leases cache. */
private final Map<ReplicationGroupId, Lease> leases; 
...

    private class UpdateListener implements WatchListener {
        @Override
        public CompletableFuture<Void> onUpdate(WatchEvent event) {
            for (EntryEvent entry : event.entryEvents()) {
                     ...
                    Lease lease = fromBytes(msEntry.value());
                    leases.put(grpId, lease);
                    ...
            return completedFuture(null);
        }
    }
...{code}

  was:Introduce happens before relation between meta storage safe time local 
publication and completion of corresponding meta storage listeners


> Introduce happends before relation between local meta storage safe time 
> publication and completion of corresponding meta storage listners
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-19532
>                 URL: https://issues.apache.org/jira/browse/IGNITE-19532
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Alexander Lapin
>            Priority: Major
>
> h3. Motivation
> Let's assume that we have a component named LeaseTracker that locally stores 
> leases in a map though meta storage updates
> {code:java}
> public class LeaseTracker implements PlacementDriver {
> /** Leases cache. */
> private final Map<ReplicationGroupId, Lease> leases; 
> ...
>     private class UpdateListener implements WatchListener {
>         @Override
>         public CompletableFuture<Void> onUpdate(WatchEvent event) {
>             for (EntryEvent entry : event.entryEvents()) {
>                      ...
>                     Lease lease = fromBytes(msEntry.value());
>                     leases.put(grpId, lease);
>                     ...
>             return completedFuture(null);
>         }
>     }
> ...{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to