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

Vladimir Ozerov edited comment on IGNITE-3343 at 7/27/16 6:08 AM:
------------------------------------------------------------------

Ivan, my comments:
1) {{IgfsImpl.listFiles}} - implemented incorrectly, you cannot return 
immediately after querying DUAL directory, because it could also have children 
in PRIMARY mode. This is why we must query IGFS meta cache as well. However, we 
should do that rationally: we already know which directories has DUAL -> 
PRIMARY transition on startup. You should create separate struture (Set?) 
inside {{IgfsModeResolver}} which will host all such paths. And we will query 
IGFS meta cache only when target path is from this set. Note that this applies 
to both {{listFIles}} and {{listPaths}} methods.
2) Remove unused method {{IgfsImpl.getFileDescriptor}}
3) Remove new constants from the {{IgfsMetaManager}} - we simply do not need 
them. If we aren't gonna query acceesTime/modTime/properties from meta cache, 
then we simply set them to default values, i.e. to 0, 0 and null respectively. 
No need for any special constants here.


was (Author: vozerov):
Ivan, my comments:
1) {{IgfsImpl.listFiles}} - implemented incorrectly, you cannot return 
immediately after querying DUAL directory, because it could also have children 
in PRIMARY mode. This is why we must query IGFS meta cache as well. However, we 
should do that rationally: we already know which directories has DUAL -> 
PRIMARY transition on startup. You should create separate struture (Set?) 
inside {{IgfsModeResolver}} which will host all such paths. And we will query 
IGFS meta cache only when target path is from this set. Note that this applies 
to both {{listFIles}} and {{listPaths}} methods.
2) Remove unused method {{IgfsImpl.getFileDescriptor}}

> IGFS: Do not query secondary file system properties during 
> create/append/mkdirs.
> --------------------------------------------------------------------------------
>
>                 Key: IGNITE-3343
>                 URL: https://issues.apache.org/jira/browse/IGNITE-3343
>             Project: Ignite
>          Issue Type: Sub-task
>          Components: IGFS
>    Affects Versions: 1.6
>            Reporter: Vladimir Ozerov
>            Assignee: Ivan Veselovsky
>            Priority: Critical
>              Labels: performance
>             Fix For: 1.7
>
>
> Currently when we create something in a secondary file system, we perform 
> additional calls to the secondary file system to get file/directory info. 
> This significantly slows down structural operations, while usually it is not 
> really needed in most cases.
> We should do the following:
> 1) Do not write modification time, access time and properties for DUAL 
> entries. Instead, we should propagate "info" and "listFiles" calls to 
> secondary file system right away.
> 2) For {{create()}} we do not need length, as the file is either created from 
> scratch, or truncated.
> 3) For {{append()}} we need to know current length, so the second file system 
> call appears to be inevitable.



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

Reply via email to