Permalink
Browse files

Fix segment patterns for synchronization to match the latest naming s…

…cheme
  • Loading branch information...
1 parent 7177feb commit 922b18f91ec852628a12bc7991e9a039b2ab27a4 @santip santip committed Jan 20, 2012
Showing with 4 additions and 6 deletions.
  1. +1 −2 storage/optimized_files_pattern
  2. +1 −2 storage/sorted_files_pattern
  3. +1 −1 storage/synchronize.sh
  4. +1 −1 storage/unsorted_files_pattern
@@ -1,6 +1,5 @@
+ /indexes
+ /indexes/*
+ /indexes/*/optimized/
-+ /indexes/*/optimized/*___sorted_*
-+ /indexes/*/optimized/*___index
++ /indexes/*/optimized/*\.optimized_*
- *
@@ -1,6 +1,5 @@
+ /indexes
+ /indexes/*
+ /indexes/*/segments/
-+ /indexes/*/segments/*___sorted_*
-+ /indexes/*/segments/*___index
++ /indexes/*/segments/*\.sorted_*
- *
View
@@ -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_* | cut -d. -f1 | awk '{printf "%s.unsorted_*\n",$1}' | xargs -L 100 rm -f
echo "[+] Fetching time delta with master..."
MASTER_DATE=`ssh $MASTER date "+%s"`
@@ -1,5 +1,5 @@
+ /indexes
+ /indexes/*
+ /indexes/*/segments/
-+ /indexes/*/segments/*___unsorted_*
++ /indexes/*/segments/*\.unsorted_*
- *

0 comments on commit 922b18f

Please sign in to comment.