/** {@inheritDoc} */ @Override public boolean onDone(@Nullable Boolean res, @Nullable Throwable err) { // Make sure to remove future before completion. pendingFuts.remove(id, this); context().exchange().exchangerUpdateHeartbeat(); return super.onDone(res, err); }
/** * @param newCrd {@code True} if node become coordinator on this exchange. * @throws IgniteCheckedException If failed. */ private void initCoordinatorCaches(boolean newCrd) throws IgniteCheckedException { if (newCrd) { IgniteInternalFuture<?> fut = cctx.affinity().initCoordinatorCaches(this, false); if (fut != null) { fut.get(); cctx.exchange().exchangerUpdateHeartbeat(); } cctx.exchange().onCoordinatorInitialized(); cctx.exchange().exchangerUpdateHeartbeat(); } }
/** * */ private void onLeft() { for (CacheGroupContext grp : cctx.cache().cacheGroups()) { if (grp.isLocal()) continue; grp.preloader().unwindUndeploys(); cctx.exchange().exchangerUpdateHeartbeat(); } }
/** * */ private void onAllServersLeft() { assert cctx.kernalContext().clientNode() : cctx.localNode(); List<ClusterNode> empty = Collections.emptyList(); for (CacheGroupContext grp : cctx.cache().cacheGroups()) { List<List<ClusterNode>> affAssignment = new ArrayList<>(grp.affinity().partitions()); for (int i = 0; i < grp.affinity().partitions(); i++) affAssignment.add(empty); grp.affinity().idealAssignment(affAssignment); grp.affinity().initialize(initialVersion(), affAssignment); cctx.exchange().exchangerUpdateHeartbeat(); } }
context().exchange().exchangerUpdateHeartbeat();
context().exchange().exchangerUpdateHeartbeat(); cacheContexts.put(cacheInfo, cacheCtx); context().exchange().exchangerUpdateHeartbeat(); context().exchange().exchangerUpdateHeartbeat(); onCacheStarted(cacheCtxEntry.getValue()); context().exchange().exchangerUpdateHeartbeat();
/** * @throws IgniteCheckedException If failed. */ private void initTopologies() throws IgniteCheckedException { cctx.database().checkpointReadLock(); try { if (crd != null) { for (CacheGroupContext grp : cctx.cache().cacheGroups()) { if (grp.isLocal()) continue; grp.topology().beforeExchange(this, !centralizedAff && !forceAffReassignment, false); cctx.exchange().exchangerUpdateHeartbeat(); } } } finally { cctx.database().checkpointReadUnlock(); } }
cctx.exchange().exchangerUpdateHeartbeat(); fetchFut); cctx.exchange().exchangerUpdateHeartbeat();
cctx.exchange().exchangerUpdateHeartbeat();
aff.clientEventTopologyChange(exchFut.firstEvent(), topVer); cctx.exchange().exchangerUpdateHeartbeat();
cctx.exchange().exchangerUpdateHeartbeat();
cctx.exchange().exchangerUpdateHeartbeat();
/** {@inheritDoc} */ @Override public boolean onDone(@Nullable Boolean res, @Nullable Throwable err) { // Make sure to remove future before completion. pendingFuts.remove(id, this); context().exchange().exchangerUpdateHeartbeat(); return super.onDone(res, err); }
/** * @param newCrd {@code True} if node become coordinator on this exchange. * @throws IgniteCheckedException If failed. */ private void initCoordinatorCaches(boolean newCrd) throws IgniteCheckedException { if (newCrd) { IgniteInternalFuture<?> fut = cctx.affinity().initCoordinatorCaches(this, false); if (fut != null) { fut.get(); cctx.exchange().exchangerUpdateHeartbeat(); } cctx.exchange().onCoordinatorInitialized(); cctx.exchange().exchangerUpdateHeartbeat(); } }
/** * @param leftNodeId Left node ID. * @param topVer Topology version. */ public void removeExplicitNodeLocks(UUID leftNodeId, AffinityTopologyVersion topVer) { for (GridDistributedCacheEntry entry : locked()) { try { entry.removeExplicitNodeLocks(leftNodeId); entry.touch(topVer); } catch (GridCacheEntryRemovedException ignore) { if (log.isDebugEnabled()) log.debug("Attempted to remove node locks from removed entry in mvcc manager " + "disco callback (will ignore): " + entry); } cctx.exchange().exchangerUpdateHeartbeat(); } }
/** * */ private void onAllServersLeft() { assert cctx.kernalContext().clientNode() : cctx.localNode(); List<ClusterNode> empty = Collections.emptyList(); for (CacheGroupContext grp : cctx.cache().cacheGroups()) { List<List<ClusterNode>> affAssignment = new ArrayList<>(grp.affinity().partitions()); for (int i = 0; i < grp.affinity().partitions(); i++) affAssignment.add(empty); grp.affinity().idealAssignment(affAssignment); grp.affinity().initialize(initialVersion(), affAssignment); cctx.exchange().exchangerUpdateHeartbeat(); } }
/** * */ private void onLeft() { for (CacheGroupContext grp : cctx.cache().cacheGroups()) { if (grp.isLocal()) continue; grp.preloader().unwindUndeploys(); cctx.exchange().exchangerUpdateHeartbeat(); } cctx.mvcc().removeExplicitNodeLocks(exchId.nodeId(), exchId.topologyVersion()); }
/** * @param exchTopVer Local join exchange future version. * @param locJoinCtx Local join cache context. * @throws IgniteCheckedException If failed. */ public IgniteInternalFuture<?> startCachesOnLocalJoin( AffinityTopologyVersion exchTopVer, LocalJoinCachesContext locJoinCtx ) throws IgniteCheckedException { long time = System.currentTimeMillis(); if (locJoinCtx == null) return new GridFinishedFuture<>(); IgniteInternalFuture<?> res = sharedCtx.affinity().initCachesOnLocalJoin( locJoinCtx.cacheGroupDescriptors(), locJoinCtx.cacheDescriptors()); for (T2<DynamicCacheDescriptor, NearCacheConfiguration> t : locJoinCtx.caches()) { DynamicCacheDescriptor desc = t.get1(); prepareCacheStart( desc.cacheConfiguration(), desc, t.get2(), exchTopVer, false); context().exchange().exchangerUpdateHeartbeat(); } if (log.isInfoEnabled()) log.info("Starting caches on local join performed in " + (System.currentTimeMillis() - time) + " ms."); return res; }
/** * @throws IgniteCheckedException If failed. */ private void initTopologies() throws IgniteCheckedException { cctx.database().checkpointReadLock(); try { if (crd != null) { for (CacheGroupContext grp : cctx.cache().cacheGroups()) { if (grp.isLocal()) continue; grp.topology().beforeExchange(this, !centralizedAff && !forceAffReassignment, false); cctx.exchange().exchangerUpdateHeartbeat(); } } } finally { cctx.database().checkpointReadUnlock(); } }
/** * Starts statically configured caches received from remote nodes during exchange. * * @param nodeId Joining node ID. * @param exchTopVer Current exchange version. * @return Started caches descriptors. * @throws IgniteCheckedException If failed. */ public Collection<DynamicCacheDescriptor> startReceivedCaches(UUID nodeId, AffinityTopologyVersion exchTopVer) throws IgniteCheckedException { List<DynamicCacheDescriptor> started = cachesInfo.cachesReceivedFromJoin(nodeId); for (DynamicCacheDescriptor desc : started) { IgnitePredicate<ClusterNode> filter = desc.groupDescriptor().config().getNodeFilter(); if (CU.affinityNode(ctx.discovery().localNode(), filter)) { prepareCacheStart( desc.cacheConfiguration(), desc, null, exchTopVer, false); context().exchange().exchangerUpdateHeartbeat(); } } return started; }