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

Roman Puchkovskiy updated IGNITE-18499:
---------------------------------------
    Description: 
There are a few differences between {{IncomingSnapshotCopier}} and 
{{{}LocalSnapshotCopier{}}}. JRaft seems to be very sensitive to little changes 
in behavior because it relies on many invariants, some of them implicit, to 
function correctly. Hence it is best to have our copier mimic the stock one as 
fully as possible (where it's feasible).

Here are the differences:
 # On cancellation, the copier should be transferred to an erroneous state 
(using {{{}setError(){}}})
 # On closure, the copier should be cancelled
 # The stock copier does not invoke {{join()}} on cancellation, but our 
implementation does. On the one hand, waiting seems to make sense because it 
allows to save retries, but it's a difference from the stock logic which might 
be dangerous.

  was:
There are a few differences between {{IncomingSnapshotCopier}} and 
{{{}LocalSnapshotCopier{}}}. JRaft seems to be very sensitive to little changes 
in behavior because it relies on many invariants, some of them implicit, to 
function correctly. Hence it is best to have our copier mimic the stock one as 
fully as possible (where it's feasible).

Here are the differences:
 # On cancellation, the copier should be transferred to an erroneous state 
(using {{{}setError(){}}})
 # On closure, the copier should be cancelled
 # The stock copier does not invoke {{join()}} on cancellation, but our 
implementation does. On the one hand, waiting seems to make sense because it 
allows to save retries, but it's a difference from the stock logic which might 
be dangerous.
 # We should only set error if it has not been set yet; but our copier 
implementation usually does the opposite: if there is an error, it sets some 
other error


> Make IncomingSnapshotCopier behave closer to LocalSnapshotCopier
> ----------------------------------------------------------------
>
>                 Key: IGNITE-18499
>                 URL: https://issues.apache.org/jira/browse/IGNITE-18499
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Roman Puchkovskiy
>            Priority: Major
>              Labels: ignite-3
>             Fix For: 3.0.0-beta2
>
>
> There are a few differences between {{IncomingSnapshotCopier}} and 
> {{{}LocalSnapshotCopier{}}}. JRaft seems to be very sensitive to little 
> changes in behavior because it relies on many invariants, some of them 
> implicit, to function correctly. Hence it is best to have our copier mimic 
> the stock one as fully as possible (where it's feasible).
> Here are the differences:
>  # On cancellation, the copier should be transferred to an erroneous state 
> (using {{{}setError(){}}})
>  # On closure, the copier should be cancelled
>  # The stock copier does not invoke {{join()}} on cancellation, but our 
> implementation does. On the one hand, waiting seems to make sense because it 
> allows to save retries, but it's a difference from the stock logic which 
> might be dangerous.



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

Reply via email to