and try to avoid lease recovery on closed files.
This was added to this issue to reduce how often we were starting up lease recovery stuff when we did not need to.
It was also something I wanted to do because I had seen a situation where recovery of leases on closed files was taking a very long time and causing odd issues with Solr. So I rolled in this change.
It seems that sometimes HDFS does not like it when you make a bunch of lease recovery calls (hopefully just because they are all on files that don't even need it). Usually, trying to recover a lease on a closed file just returns - but on larger indexes something problematic seems to happen instead. I've got more to find out in that area, but this improves the situation.