You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Ivan Veselovsky (JIRA)" <ji...@apache.org> on 2016/07/04 09:43:12 UTC

[jira] [Commented] (IGNITE-3405) IGFS: Do not allow DUAL -> PRIMARY -> DUAL modes interleaving.

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

Ivan Veselovsky commented on IGNITE-3405:
-----------------------------------------

{quote} simple 2 nested loops will be enough {quote}
yes, my solution also uses 2 nested loops. So, please clarify, what is complex and inefficient, and how we can reduce that?
Just in my solution this loop is splitted into 2 separate methods.
Please note that my algorithm also fixes possible user's mistakes, e.g. if both "/a/b" and "/a/b/c" declared to be PRIMARY, it will remove the latter, since this is a subpath that is already PRIMARY.

{quote}  IgfsPath is already comparable.{quote}
Yes, but the default #compareTo() is implemented as String comparison. Here we need depth comparison, which is different. E.g. strings 
x="/a/k", y="/b/c/d", z="/z" are string-compared as {x,y,z} , while depth-compared as {z,x,y}.

{quote} once and only once on node start. {quote}
yes, this is a good point, I will move path filtering into IgfsImpl(Ctx) constructor.




> IGFS: Do not allow DUAL -> PRIMARY -> DUAL modes interleaving.
> --------------------------------------------------------------
>
>                 Key: IGNITE-3405
>                 URL: https://issues.apache.org/jira/browse/IGNITE-3405
>             Project: Ignite
>          Issue Type: Bug
>          Components: IGFS
>    Affects Versions: 1.6
>            Reporter: Vladimir Ozerov
>            Assignee: Ivan Veselovsky
>            Priority: Critical
>             Fix For: 1.7
>
>
> Currently we allow almost any combinations of path modes. This appears to be wrong. Consider the following scenario:
> 1) /dir1 -> PRIMARY
> 2) /dir1/dir2 -> DUAL
> It is impossible to support this scenario properly because {{dir1}} will be created in both file systems anyway, but primary and secondary representation will be "detached" from each other.
> Instead, we should allow only DUAL -> PRIMARY and DUAL -> PROXY transitions. Any other combinations doesn't make sense.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)