/** * @param cacheName Cache name. */ public boolean walEnabled(String cacheName) { DynamicCacheDescriptor desc = ctx.cache().cacheDescriptor(cacheName); if (desc == null) throw new IgniteException("Cache not found: " + cacheName); return desc.groupDescriptor().walEnabled(); }
/** * Callback invoked when caches info is collected inside cache processor start routine. Discovery is not * active at this point. */ public void onCachesInfoCollected() { if (!srv) return; synchronized (mux) { // Process top pending requests. for (CacheGroupDescriptor grpDesc : cacheProcessor().cacheGroupDescriptors().values()) { WalStateProposeMessage msg = grpDesc.nextWalChangeRequest(); if (msg != null) { if (log.isDebugEnabled()) log.debug("Processing WAL state message on start: " + msg); boolean enabled = grpDesc.walEnabled(); WalStateResult res; if (F.eq(enabled, msg.enable())) res = new WalStateResult(msg, false); else { res = new WalStateResult(msg, true); grpDesc.walEnabled(!enabled); } initialRess.add(res); addResult(res); } } } }
/** {@inheritDoc} */ @Override public void beforeCacheGroupStart(CacheGroupDescriptor grpDesc) { if (grpDesc.persistenceEnabled()) { boolean localEnabled = cctx.database().walEnabled(grpDesc.groupId(), true); boolean globalEnabled = cctx.database().walEnabled(grpDesc.groupId(), false); if (!localEnabled || !globalEnabled) { File dir = cacheWorkDir(grpDesc.config()); assert dir.exists(); boolean res = IgniteUtils.delete(dir); assert res; if (!globalEnabled) grpDesc.walEnabled(false); } } }
grpDesc.walEnabled(!grpDesc.walEnabled());
0, grpDesc.persistenceEnabled(), grpDesc.walEnabled(), grpDesc.walChangeRequests());
exchTopVer, persistenceEnabled, desc.walEnabled(), recoveryMode );
/** * @param cacheName Cache name. */ public boolean walEnabled(String cacheName) { DynamicCacheDescriptor desc = ctx.cache().cacheDescriptor(cacheName); if (desc == null) throw new IgniteException("Cache not found: " + cacheName); return desc.groupDescriptor().walEnabled(); }
/** * Callback invoked when caches info is collected inside cache processor start routine. Discovery is not * active at this point. */ public void onCachesInfoCollected() { if (!srv) return; synchronized (mux) { // Process top pending requests. for (CacheGroupDescriptor grpDesc : cacheProcessor().cacheGroupDescriptors().values()) { WalStateProposeMessage msg = grpDesc.nextWalChangeRequest(); if (msg != null) { if (log.isDebugEnabled()) log.debug("Processing WAL state message on start: " + msg); boolean enabled = grpDesc.walEnabled(); WalStateResult res; if (F.eq(enabled, msg.enable())) res = new WalStateResult(msg, false); else { res = new WalStateResult(msg, true); grpDesc.walEnabled(!enabled); } initialRess.add(res); addResult(res); } } } }
/** {@inheritDoc} */ @Override public void beforeCacheGroupStart(CacheGroupDescriptor grpDesc) { if (grpDesc.persistenceEnabled()) { boolean localEnabled = cctx.database().walEnabled(grpDesc.groupId(), true); boolean globalEnabled = cctx.database().walEnabled(grpDesc.groupId(), false); if (!localEnabled || !globalEnabled) { File dir = cacheWorkDir(grpDesc.config()); assert dir.exists(); boolean res = IgniteUtils.delete(dir); assert res; if (!globalEnabled) grpDesc.walEnabled(false); } } }
grpDesc.walEnabled(!grpDesc.walEnabled());
0, grpDesc.persistenceEnabled(), grpDesc.walEnabled(), grpDesc.walChangeRequests());
exchTopVer, persistenceEnabled, desc.walEnabled() );