[ https://issues.apache.org/jira/browse/LUCENE-10457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17503290#comment-17503290 ]
Robert Muir commented on LUCENE-10457: -------------------------------------- {quote} In what ways? If you pass a symlink to a directory to Files.isDirectory it will return true. You have to specifically ask Java for Link_Option.NOFOLLOW to get the distinction. {quote} I don't care what java does or doesn't do. It is so different to the OS, and we don't use it, so I don't want it confusing our tests. You can start with reading relevant manpages in posix or linux to get an idea of what kinds of issues you might run into: with any program, no need to think about java. These kinds of issues always stand out: I'm literally just pasting summaries of the shit listed in {{symlink(4)}}, which is just the introduction. * can contain relative pointers * can point to nothing at all (dangling link) * interact with DAC permissions in strange ways * have zero error checking when creating them (makes dangling links easy) * interact with file deletion in strange ways I'm not even gonna think about issues around lower-level OS issues such as synchronization to disk, where things always get hairy. Then on the java side, we can imagine how all this crap translates: * stuff like "getting FileStore to a symlink" will probably never work correctly. * stupid methods like isReadable/isWritable might be buggy. * dangling links may cause chaos across the APIs. Sounds like you used symlinks without considering these issues and you got the punishment you deserved :) Instead of thinking "whoah, we got bit because we made a bad design, let's rethink that", instead now you are trying to insert symlink tests into all of lucene's tests (including stuff like build tools). And randomly! I'm -1 because I know symlinks are different and I know the problems of symlinks and have suffered through them before. There is no need for us to do this because Solr made a bad decision. > LuceneTestCase.createTempDir could randomly return symbolic links > ----------------------------------------------------------------- > > Key: LUCENE-10457 > URL: https://issues.apache.org/jira/browse/LUCENE-10457 > Project: Lucene - Core > Issue Type: Task > Components: general/test > Reporter: Mike Drob > Priority: Major > > When we are creating temporary directories to use for other Lucene functions, > we could occasionally provide symbolic links instead of direct references to > directories. If the system running tests doesn't support symbolic links, then > we should ignore this option. > Providing links would be useful to test scenarios for example where users > have a symbolic link for the "current" index directory and then rotate that > over time but applications still use the same link. -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org