14484: Adds test for pdh grouping functionality in the container model
[arvados.git] / services / api / app / models / container.rb
index f3da800827b16468137b31bf8c4be4b57754fdd1..0f48a750119164bb0790e1ff926e39bf6c3b0976 100644 (file)
@@ -411,8 +411,7 @@ class Container < ArvadosModel
   #
   # Correctly groups pdhs to use for batch database updates. Helps avoid
   # updating too many database rows in a single transaction.
-  def self.group_pdhs_for_multiple_transactions(distinct_ordered_pdhs, distinct_pdh_count, log_prefix)
-    batch_size_max = 1 << 28 # 256 MiB
+  def self.group_pdhs_for_multiple_transactions(distinct_ordered_pdhs, distinct_pdh_count, batch_size_max, log_prefix)
     batch_size = 0
     batch_pdhs = {}
     last_pdh = '0'