Fixed checkpoint listener logic - Fixes
@@ -170,35 +170,36 @@ public class GridCacheOffheapManager extends IgniteCacheOffheapManagerImpl imple
Executor execSvc = ctx.executor();
- if (execSvc == null) {
- reuseList.saveMetadata();
-
- if (ctx.nextSnapshot())
+ if (ctx.nextSnapshot() && ctx.needToSnapshot(grp.cacheOrGroupName())) {
+ if (execSvc == null)
updateSnapshotTag(ctx);
-
- for (CacheDataStore store : partDataStores.values())
- saveStoreMetadata(store, ctx, false);
- }
else {
execSvc.execute(() -> {
try {
- reuseList.saveMetadata();
+ updateSnapshotTag(ctx);
}
catch (IgniteCheckedException e) {
throw new IgniteException(e);
}
});
+ }
+ }
- if (ctx.nextSnapshot()) {
+ if (execSvc == null) {
+ reuseList.saveMetadata();
+
+ for (CacheDataStore store : partDataStores.values())
+ saveStoreMetadata(store, ctx, false);
+ }
+ else {
execSvc.execute(() -> {
try {
- updateSnapshotTag(ctx);
+ reuseList.saveMetadata();
}
catch (IgniteCheckedException e) {
throw new IgniteException(e);
}
});
- }
for (CacheDataStore store : partDataStores.values())
execSvc.execute(() -> {
