[ARVADOS] updated: a307f4b97a91ae47e3498dac36d0a47b1c0eedcd

git at public.curoverse.com git at public.curoverse.com
Fri Mar 20 17:17:07 EDT 2015


Summary of changes:
 ...3210106_fix_collection_portable_data_hash_with_hinted_manifest.rb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

       via  a307f4b97a91ae47e3498dac36d0a47b1c0eedcd (commit)
      from  7e5416c8d769fa6520dad72cd0612f1776d88219 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit a307f4b97a91ae47e3498dac36d0a47b1c0eedcd
Author: Brett Smith <brett at curoverse.com>
Date:   Fri Mar 20 17:16:43 2015 -0400

    5319: Bound search in collection PDH fix migration.
    
    Only search collections that exist when the migration begins.  This
    helps avoid an infinite loop where we yield a bad collection, it gets
    fixed a new replacement is created, and then we find and yield the
    replacement…  Refs #5319.

diff --git a/services/api/db/migrate/20150303210106_fix_collection_portable_data_hash_with_hinted_manifest.rb b/services/api/db/migrate/20150303210106_fix_collection_portable_data_hash_with_hinted_manifest.rb
index 9bbe113..ee6865f 100644
--- a/services/api/db/migrate/20150303210106_fix_collection_portable_data_hash_with_hinted_manifest.rb
+++ b/services/api/db/migrate/20150303210106_fix_collection_portable_data_hash_with_hinted_manifest.rb
@@ -55,9 +55,12 @@ class FixCollectionPortableDataHashWithHintedManifest < ActiveRecord::Migration
   end
 
   def each_bad_collection
+    end_coll = Collection.order("id DESC").first
+    return if end_coll.nil?
     seen_uuids = []
     ("A".."Z").each do |hint_char|
-      query = Collection.where("manifest_text LIKE '%+#{hint_char}%'")
+      query = Collection.
+        where("id <= ? AND manifest_text LIKE '%+#{hint_char}%'", end_coll.id)
       unless seen_uuids.empty?
         query = query.where("uuid NOT IN (?)", seen_uuids)
       end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list