You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vladimir Steshin (Jira)" <ji...@apache.org> on 2024/10/31 13:21:00 UTC

[jira] [Created] (IGNITE-23584) Snapshot. Fix logic of the quick snapshot handler.

Vladimir Steshin created IGNITE-23584:
-----------------------------------------

             Summary: Snapshot. Fix logic of the quick snapshot handler.
                 Key: IGNITE-23584
                 URL: https://issues.apache.org/jira/browse/IGNITE-23584
             Project: Ignite
          Issue Type: Bug
    Affects Versions: 2.14
            Reporter: Vladimir Steshin
            Assignee: Vladimir Steshin


_SnapshotPartitionsQuickVerifyHandler_ is a bit wierd. It continues checking partitions even if detects the `no-need-to-work` condition. And then skips the collected results. We should not do any checks is the streamer warning is detected. 

{code:java}
for (SnapshotHandlerResult<Map<PartitionKeyV2, PartitionHashRecordV2>> result : results) {
            if (result.error() != null)
                throw new IgniteCheckedException(result.error());

            if (result.data() == null) {
                noData = true;

                continue;
            }

            Map<PartitionKeyV2, PartitionHashRecordV2> partsData = result.data();

            partsData.forEach((part, val) -> {
                PartitionHashRecordV2 other = total.putIfAbsent(part, val);

                if ((other != null && !wrnGrps.contains(part.groupId()))
                    && ((!val.hasExpiringEntries() && !other.hasExpiringEntries() && val.size() != other.size())
                        || !Objects.equals(val.updateCounter(), other.updateCounter())))
                    wrnGrps.add(part.groupId());
            });
        }

        if (noData)
            return;

        if (!wrnGrps.isEmpty()) {
            throw new SnapshotWarningException("Cache partitions differ for cache groups " +
                S.toStringSortedDistinct(wrnGrps) + ". " + WRN_MSG);
        }
{code}

Suggestion:
{code:java}
 if (result.data() == null)
     return;
{code}




--
This message was sent by Atlassian Jira
(v8.20.10#820010)