[ 
https://issues.apache.org/jira/browse/IGNITE-3542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15905208#comment-15905208
 ] 

Ivan Veselovsky edited comment on IGNITE-3542 at 3/13/17 1:54 PM:
------------------------------------------------------------------

[~vozerov] , 
1) The suggested fix does not prevent the {code}delete{code} to be invoked on 
underlying Fs in case integrity check failed, we just do retry and go to next 
loop in this case. This is exactly what is requested by this ticket.
2) The problem is that we base on natural assertion "file does not exist after 
removal", and with  current implementation of IgfsImpl#exists() we can fulfill 
it only if the file is also deleted from the secondary file system upon 
removal. The reason is that if a file does not exist on primary file system, 
but exists on the secondary one, IgfsImpl#exists() returns *true*. Test 
org.apache.ignite.internal.processors.igfs.IgfsDualAbstractSelfTest#testDeletePathMissingPartially
 checks this behavior.
It seems, throwing an exception in this case would violate the method contract, 
since method org.apache.ignite.IgniteFileSystem#delete javadoc specifies 
throwing IgniteException on error only. 
So, I would suggest to stay with the behavior suggested in the patch -- it 
seems logical and corresponds to the existing tests.


was (Author: iveselovskiy):
[~vozerov] , 
1) The suggested fix does not prevent the {code}delete{code} to be invoked on 
underlying Fs in case integrity check failed, we just do retry and go to next 
loop in this case. This is exactly what is requested by this ticket.
2) The problem is that we base on natural assertion "file does not exist after 
removal", and with  current implementation of IgfsImpl#exists() we can fulfill 
it only if the file is also deleted from the secondary file system upon 
removal. The matter is that if a file does not exist on primary file system, 
but exists on the secondary one, #exists() returns *true*.

> IGFS: Ensure IgfsPathIds.verifyIntegrity() always lead to re-try.
> -----------------------------------------------------------------
>
>                 Key: IGNITE-3542
>                 URL: https://issues.apache.org/jira/browse/IGNITE-3542
>             Project: Ignite
>          Issue Type: Bug
>          Components: IGFS
>    Affects Versions: 1.6
>            Reporter: Vladimir Ozerov
>            Assignee: Ivan Veselovsky
>            Priority: Minor
>             Fix For: 2.0
>
>
> If integrity check failed, it means that some concurrent file system update 
> occurred. We should always perform re-try in this case.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to