Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updating file pattern for removing sorted/unsorted duplicates, and us…

…ing sed to do replacement instead of cut+awk
  • Loading branch information...
commit e8770f5e24bc0388f945a2d7d5ca795a2edb2e3b 1 parent 95da79f
@searchify searchify authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  storage/synchronize.sh
View
2  storage/synchronize.sh
@@ -81,7 +81,7 @@ if [[ ! -f "/data/master" || ! -f "/data/storage/safe_to_read" ]]; then
if [[ $? != 0 ]]; then echo ">>>>>>>>>>>>>>>>>> FAILED to synchronize optimized segments :("; exit 1; fi
echo "[+] Removing duplicates between sorted and unsorted segments..."
- find /data/storage/migrating/indexes -name *.sorted_* | cut -d. -f1 | awk '{printf "%s.unsorted_*\n",$1}' | xargs -L 100 rm -f
+ find /data/storage/migrating/indexes -name *\.sorted_* | sed -r -e "s/\.sorted_[0-9]+$/.unsorted_*/" | xargs -L 100 rm -f
echo "[+] Fetching time delta with master..."
MASTER_DATE=`ssh $MASTER date "+%s"`
Please sign in to comment.
Something went wrong with that request. Please try again.