mirror of https://github.com/apache/lucene.git
changed from using ls to find to handle very large number of snapshots
git-svn-id: https://svn.apache.org/repos/asf/incubator/solr/trunk@415631 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1160b4de26
commit
193ca199e3
|
@ -171,7 +171,7 @@ fi
|
|||
# get directory name of latest snapshot if not specified on command line
|
||||
if [[ -z ${snap_name} ]]
|
||||
then
|
||||
snap_name=`ssh -o StrictHostKeyChecking=no ${master_host} "ls -d ${master_data_dir}/snapshot.* 2>/dev/null"|tail -1`
|
||||
snap_name=`ssh -o StrictHostKeyChecking=no ${master_host} "find ${master_data_dir} -name snapshot.* -print"|grep -v wip|sort -r|head -1`
|
||||
fi
|
||||
if [[ "${snap_name}" == "" ]]
|
||||
then
|
||||
|
|
Loading…
Reference in New Issue