stackabletech / stackablectl

Commandline tool to interact with a Stackable Data Platform
Other
8 stars 1 forks source link

stackablectl demo install slow if the working directory contains many subdirectories #242

Closed Jimvin closed 8 months ago

Jimvin commented 1 year ago

When installing a demo stackablectl traverses the directory tree under the current working directory. If there are a lot of directories this can take a long time and the demo installation hangs. On the same system running the demo install command in an empty directory allows the job to complete very quickly by comparison.

I've attached a copy of the stackablectl output run with strace. The last console output of the script before it hangs is: [DEBUG] built glob set; 0 literals, 0 basenames, 0 extensions, 0 prefixes, 0 suffixes, 1 required extensions, 0 regexes

After that you can see that the subdirectories of the working directory are recursivley enumerated.

stackablectl_strace.txt

Jimvin commented 1 year ago

I've looked at the full strace output and noticed and the reason it never completes when run from my home directory is because of a symlink to / buried in an application directory, causing an infinite loop as it recursively enumerates the directories. It's still puzzling why it does this enumeration though.

lfrancke commented 1 year ago

I wonder why it needs to traverse directories at all...

fhennig commented 8 months ago

looks like this is fixed in the new version, I'm closing this.

If you disagree,please reopen @Jimvin