You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Anton Vinogradov (Jira)" <ji...@apache.org> on 2021/12/28 12:01:00 UTC

[jira] [Updated] (IGNITE-16224) Read Repair attempts must be limited to avoid stack overflow

     [ https://issues.apache.org/jira/browse/IGNITE-16224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Anton Vinogradov updated IGNITE-16224:
--------------------------------------
    Description: 
Currently, we perform `repairAsync` on every consistency violation.

{noformat}
protected Map<K, V> repairableGetAll(
        Collection<? extends K> keys,
        boolean deserializeBinary,
        boolean needVer,
        boolean recovery,
        ReadRepairStrategy readRepairStrategy) throws IgniteCheckedException {
        try {
            return getAll(keys, deserializeBinary, needVer, recovery, readRepairStrategy);
        }
        catch (IgniteIrreparableConsistencyViolationException e) {
            throw e;
        }
        catch (IgniteConsistencyViolationException e) {
            repairAsync(keys, ctx.operationContextPerCall(), false).get();

            return repairableGetAll(keys, deserializeBinary, needVer, recovery, readRepairStrategy);
        }
    }
{noformat}

In case of concurrent modifications and/or some bugs, stack overflow is possible here.
Rechecks and repairs should be limited.

> Read Repair attempts must be limited to avoid stack overflow
> ------------------------------------------------------------
>
>                 Key: IGNITE-16224
>                 URL: https://issues.apache.org/jira/browse/IGNITE-16224
>             Project: Ignite
>          Issue Type: Sub-task
>            Reporter: Anton Vinogradov
>            Assignee: Anton Vinogradov
>            Priority: Major
>
> Currently, we perform `repairAsync` on every consistency violation.
> {noformat}
> protected Map<K, V> repairableGetAll(
>         Collection<? extends K> keys,
>         boolean deserializeBinary,
>         boolean needVer,
>         boolean recovery,
>         ReadRepairStrategy readRepairStrategy) throws IgniteCheckedException {
>         try {
>             return getAll(keys, deserializeBinary, needVer, recovery, readRepairStrategy);
>         }
>         catch (IgniteIrreparableConsistencyViolationException e) {
>             throw e;
>         }
>         catch (IgniteConsistencyViolationException e) {
>             repairAsync(keys, ctx.operationContextPerCall(), false).get();
>             return repairableGetAll(keys, deserializeBinary, needVer, recovery, readRepairStrategy);
>         }
>     }
> {noformat}
> In case of concurrent modifications and/or some bugs, stack overflow is possible here.
> Rechecks and repairs should be limited.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)