nizhikov commented on code in PR #11112:
URL: https://github.com/apache/ignite/pull/11112#discussion_r1432667241
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/dump/CreateDumpFutureTask.java:
##########
@@ -519,12 +529,25 @@ public void writeChanged(int cache, long expireTime,
KeyCacheObject key, CacheOb
reasonToSkip = "partition already saved";
else if (isAfterStart(ver))
reasonToSkip = "greater version";
- else if (!changed.get(cache).add(key)) // Entry changed
several time during dump.
- reasonToSkip = "changed several times";
- else if (val == null)
- reasonToSkip = "newly created or already removed"; //
Previous value is null. Entry created after dump start, skip.
else {
- write(cache, expireTime, key, val, ver);
+ try {
+ CacheObjectContext coCtx =
cctx.cacheObjectContext(cache);
+
+ synchronized (serializer) { // Prevent concurrent
access to the dump file.
+ if (isWrittenByIterator(cache, key, coCtx))
+ reasonToSkip = "written by iterator"; //
Saved by iterator, already. Skip.
+ else if (!changed.get(cache).add(key)) //
Entry changed several time during dump.
+ reasonToSkip = "changed several times";
+ else if (val == null)
Review Comment:
This can't be done
--
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]