timoninmaxim commented on a change in pull request #9345:
URL: https://github.com/apache/ignite/pull/9345#discussion_r808910724
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java
##########
@@ -1041,7 +1041,7 @@ public void destroyPartitionStore(int partId) throws
IgniteCheckedException {
int tag = pageMemory.invalidate(grp.groupId(), partId);
- if (grp.walEnabled())
+ if (grp.persistenceEnabled() && grp.walEnabled())
Review comment:
Do we need this change, after adding `walOrCdcEnabled()` method?
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
##########
@@ -800,13 +801,28 @@ else if (op == READ) {
cctx.mvccCaching().onTxFinished(this, true);
+ boolean walEnabled = false;
+
+ // Log only there are at least one persistent or cdc
enabled group.
if (!near() && !F.isEmpty(dataEntries) && cctx.wal()
!= null) {
Review comment:
I think we should check `cdcWal()` here too?
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
##########
@@ -114,6 +114,9 @@
/** Write ahead log manager. {@code Null} if persistence is not enabled. */
@Nullable private IgniteWriteAheadLogManager walMgr;
+ /** Write ahead log manager for CDC. {@code Null} if persistence and cdc
is not enabled. */
Review comment:
Let's make it enabled only when CDC is enabled?
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtLocalPartition.java
##########
@@ -1001,7 +1001,7 @@ protected long clearAll(EvictionContext evictionCtx)
throws NodeStoppingExceptio
// and repeat clearing on applying updates from WAL if the record
was read.
// It's need for atomic cache only. Transactional cache start a
rebalance due to outdated counter in this case,
// because atomic and transactional caches use different partition
counters implementation.
- if (state() == MOVING && !recoveryMode && grp.walEnabled() &&
+ if (state() == MOVING && !recoveryMode && grp.persistenceEnabled()
&& grp.walEnabled() &&
Review comment:
The same, do we need this change now, if now we have separated
walOrCdcEnabled() method?
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtLocalPartition.java
##########
@@ -229,7 +229,7 @@ public GridDhtLocalPartition(
store = grp.offheap().createCacheDataStore(id);
// Log partition creation for further crash recovery purposes.
- if (grp.walEnabled() && !recovery)
+ if (grp.persistenceEnabled() && grp.walEnabled() && !recovery)
Review comment:
The same, do we need this change now, if now we have separated
`walOrCdcEnabled()` method?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]