[Collab-qa-commits] r1975 - udd/udd

Lucas Nussbaum lucas at alioth.debian.org
Wed Jul 27 17:09:10 UTC 2011


Author: lucas
Date: 2011-07-27 17:09:10 +0000 (Wed, 27 Jul 2011)
New Revision: 1975

Modified:
   udd/udd/bibref_gatherer.py
   udd/udd/bugs_gatherer.pl
   udd/udd/carnivore_gatherer.py
   udd/udd/ddtp_gatherer.py
   udd/udd/debtags_gatherer.py
   udd/udd/deferred_gatherer.py
   udd/udd/dehs_gatherer.py
   udd/udd/ftpnew_gatherer.py
   udd/udd/hints_gatherer.py
   udd/udd/i18n_apps_gatherer.py
   udd/udd/ldap_gatherer.py
   udd/udd/lintian_gatherer.py
   udd/udd/orphaned_packages_gatherer.py
   udd/udd/packages_gatherer.py
   udd/udd/popcon_gatherer.py
   udd/udd/pts_gatherer.py
   udd/udd/removals_gatherer.py
   udd/udd/screenshot_gatherer.py
   udd/udd/sources_gatherer.py
   udd/udd/testing_migrations_gatherer.py
   udd/udd/ubuntu_bugs_gatherer.py
   udd/udd/upload_history_gatherer.py
   udd/udd/wannabuild_gatherer.py
Log:
switch from ANALYZE to VACUUM ANALYZE as it no longer requires locking

Modified: udd/udd/bibref_gatherer.py
===================================================================
--- udd/udd/bibref_gatherer.py	2011-07-27 16:58:33 UTC (rev 1974)
+++ udd/udd/bibref_gatherer.py	2011-07-27 17:09:10 UTC (rev 1975)
@@ -55,7 +55,7 @@
         print >>stderr, "Unable to inject data for package %s, key %s, value %s. %s" % (package, key, value, err)
         print >>stderr,  "-->", res
     cur.execute("DEALLOCATE bibref_insert")
-    cur.execute("ANALYZE %s" % my_config['table'])
+    cur.execute("VACUUM ANALYZE %s" % my_config['table'])
 
 if __name__ == '__main__':
   main()

Modified: udd/udd/bugs_gatherer.pl
===================================================================
--- udd/udd/bugs_gatherer.pl	2011-07-27 16:58:33 UTC (rev 1974)
+++ udd/udd/bugs_gatherer.pl	2011-07-27 17:09:10 UTC (rev 1975)
@@ -350,11 +350,11 @@
 	print "Inserting bugs: ",(time() - $t),"s\n" if $timing;
 
 	foreach my $postfix (qw{_packages _merged_with _found_in _fixed_in _tags}, '') {
-		my $sth = $dbh->prepare("ANALYZE $table$postfix");
+		my $sth = $dbh->prepare("VACUUM ANALYZE $table$postfix");
 		$sth->execute() or die $!;
 	}
 
-	my $sth = $dbh->prepare("ANALYZE ".$src_config{'usertags-table'});
+	my $sth = $dbh->prepare("VACUUM ANALYZE ".$src_config{'usertags-table'});
 	$sth->execute() or die $!;
 
 	print "Analyzing bugs: ",(time() - $t),"s\n" if $timing;

Modified: udd/udd/carnivore_gatherer.py
===================================================================
--- udd/udd/carnivore_gatherer.py	2011-07-27 16:58:33 UTC (rev 1974)
+++ udd/udd/carnivore_gatherer.py	2011-07-27 17:09:10 UTC (rev 1975)
@@ -118,7 +118,7 @@
               record[info["name"]] = set()
             record[info["name"]].add(content.rstrip())
     for table in ['emails', 'names', 'keys', 'login']:
-      cur.execute("ANALYZE %s" % my_config["%s-table" % table])
+      cur.execute("VACUUM ANALYZE %s" % my_config["%s-table" % table])
 
 if __name__ == '__main__':
   main()

Modified: udd/udd/ddtp_gatherer.py
===================================================================
--- udd/udd/ddtp_gatherer.py	2011-07-27 16:58:33 UTC (rev 1974)
+++ udd/udd/ddtp_gatherer.py	2011-07-27 17:09:10 UTC (rev 1975)
@@ -246,7 +246,7 @@
         self.connection.commit()
 
     cur.execute("DEALLOCATE ddtp_insert")
-    cur.execute("ANALYZE %s" % my_config['table'])
+    cur.execute("VACUUM ANALYZE %s" % my_config['table'])
 
 if __name__ == '__main__':
   main()

Modified: udd/udd/debtags_gatherer.py
===================================================================
--- udd/udd/debtags_gatherer.py	2011-07-27 16:58:33 UTC (rev 1974)
+++ udd/udd/debtags_gatherer.py	2011-07-27 17:09:10 UTC (rev 1975)
@@ -70,7 +70,7 @@
             cur.execute('EXECUTE debtags_insert (%s, %s)' \
                             % (quote(pkg), quote(tag)))
         cur.execute('DEALLOCATE debtags_insert')
-        cur.execute("ANALYZE %s" % conf['table'])
+        cur.execute("VACUUM ANALYZE %s" % conf['table'])
 
 
 def test():

Modified: udd/udd/deferred_gatherer.py
===================================================================
--- udd/udd/deferred_gatherer.py	2011-07-27 16:58:33 UTC (rev 1974)
+++ udd/udd/deferred_gatherer.py	2011-07-27 17:09:10 UTC (rev 1975)
@@ -83,9 +83,9 @@
     cur.executemany(q_defarch, da_list)
     cur.executemany(q_defbin, db_list)
     cur.executemany(q_defcloses, dc_list)
-    cur.execute("ANALYZE deferred")
-    cur.execute("ANALYZE deferred_architecture")
-    cur.execute("ANALYZE deferred_binary")
-    cur.execute("ANALYZE deferred_closes")
+    cur.execute("VACUUM ANALYZE deferred")
+    cur.execute("VACUUM ANALYZE deferred_architecture")
+    cur.execute("VACUUM ANALYZE deferred_binary")
+    cur.execute("VACUUM ANALYZE deferred_closes")
 
 # vim:set et tabstop=2:0

Modified: udd/udd/dehs_gatherer.py
===================================================================
--- udd/udd/dehs_gatherer.py	2011-07-27 16:58:33 UTC (rev 1974)
+++ udd/udd/dehs_gatherer.py	2011-07-27 17:09:10 UTC (rev 1975)
@@ -64,7 +64,7 @@
 
     cur.executemany("EXECUTE dehs_insert (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)", entries)
     cur.execute("DEALLOCATE dehs_insert")
-    cur.execute("ANALYZE dehs")
+    cur.execute("VACUUM ANALYZE dehs")
 
 if __name__ == '__main__':
   main()

Modified: udd/udd/ftpnew_gatherer.py
===================================================================
--- udd/udd/ftpnew_gatherer.py	2011-07-27 16:58:33 UTC (rev 1974)
+++ udd/udd/ftpnew_gatherer.py	2011-07-27 17:09:10 UTC (rev 1975)
@@ -515,8 +515,8 @@
     cur.execute("DEALLOCATE ftpnew_insert_source")
     cur.execute("DEALLOCATE ftpnew_insert_package")
     cur.execute("DEALLOCATE ftpnew_check_existing_package")
-    cur.execute("ANALYZE %s" % my_config["table_sources"])
-    cur.execute("ANALYZE %s" % my_config["table_packages"])
+    cur.execute("VACUUM ANALYZE %s" % my_config["table_sources"])
+    cur.execute("VACUUM ANALYZE %s" % my_config["table_packages"])
 
 if __name__ == '__main__':
   main()

Modified: udd/udd/hints_gatherer.py
===================================================================
--- udd/udd/hints_gatherer.py	2011-07-27 16:58:33 UTC (rev 1974)
+++ udd/udd/hints_gatherer.py	2011-07-27 17:09:10 UTC (rev 1975)
@@ -128,4 +128,4 @@
             hs.append(h.copy())
     cursor.executemany(query, hs)
     cursor.execute("DEALLOCATE h_insert")
-    cursor.execute("ANALYZE hints")
+    cursor.execute("VACUUM ANALYZE hints")

Modified: udd/udd/i18n_apps_gatherer.py
===================================================================
--- udd/udd/i18n_apps_gatherer.py	2011-07-27 16:58:33 UTC (rev 1974)
+++ udd/udd/i18n_apps_gatherer.py	2011-07-27 17:09:10 UTC (rev 1975)
@@ -212,8 +212,8 @@
       except IOError, err:
         print >>stderr, "Error reading %s (%s)" % (file, err)
 
-    cur.execute("ANALYZE %s" % my_config['table_apps'])
-    cur.execute("ANALYZE %s" % my_config['table_debconf'])
+    cur.execute("VACUUM ANALYZE %s" % my_config['table_apps'])
+    cur.execute("VACUUM ANALYZE %s" % my_config['table_debconf'])
 
 if __name__ == '__main__':
   main()

Modified: udd/udd/ldap_gatherer.py
===================================================================
--- udd/udd/ldap_gatherer.py	2011-07-27 16:58:33 UTC (rev 1974)
+++ udd/udd/ldap_gatherer.py	2011-07-27 17:09:10 UTC (rev 1975)
@@ -60,7 +60,7 @@
 
     cur.executemany("EXECUTE ldap_insert (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)", entries)
     cur.execute("DEALLOCATE ldap_insert")
-    cur.execute("ANALYZE ldap")
+    cur.execute("VACUUM ANALYZE ldap")
 
 if __name__ == '__main__':
   main()

Modified: udd/udd/lintian_gatherer.py
===================================================================
--- udd/udd/lintian_gatherer.py	2011-07-27 16:58:33 UTC (rev 1974)
+++ udd/udd/lintian_gatherer.py	2011-07-27 17:09:10 UTC (rev 1975)
@@ -78,7 +78,7 @@
       # cur.executemany("EXECUTE lintian_insert (%s, %s, %s, %s, %s)", [e])
     cur.executemany("EXECUTE lintian_insert (%s, %s, %s, %s, %s)", entries)
     cur.execute("DEALLOCATE lintian_insert")
-    cur.execute("ANALYZE %s" % my_config["table"])
+    cur.execute("VACUUM ANALYZE %s" % my_config["table"])
 
 if __name__ == '__main__':
   main()

Modified: udd/udd/orphaned_packages_gatherer.py
===================================================================
--- udd/udd/orphaned_packages_gatherer.py	2011-07-27 16:58:33 UTC (rev 1974)
+++ udd/udd/orphaned_packages_gatherer.py	2011-07-27 17:09:10 UTC (rev 1975)
@@ -70,6 +70,6 @@
         except IntegrityError, message:
           print "Integrity Error inserting bug " + str(row[0]) + " " + m.group(2)
           continue
-    cur2.execute("ANALYZE %s" % self.my_config['table'])
+    cur2.execute("VACUUM ANALYZE %s" % self.my_config['table'])
 
 # vim:set et tabstop=2:

Modified: udd/udd/packages_gatherer.py
===================================================================
--- udd/udd/packages_gatherer.py	2011-07-27 16:58:33 UTC (rev 1974)
+++ udd/udd/packages_gatherer.py	2011-07-27 17:09:10 UTC (rev 1975)
@@ -211,9 +211,9 @@
       SELECT DISTINCT distribution, release, component, architecture
       FROM %s""" % (table + '_distrelcomparch', table))
 
-    cur.execute("ANALYZE %s" % table)
-    cur.execute("ANALYZE %s" % table + '_summary')
-    cur.execute("ANALYZE %s" % table + '_distrelcomparch')
+    cur.execute("VACUUM ANALYZE %s" % table)
+    cur.execute("VACUUM ANALYZE %s" % table + '_summary')
+    cur.execute("VACUUM ANALYZE %s" % table + '_distrelcomparch')
 
     self.print_warnings()
 

Modified: udd/udd/popcon_gatherer.py
===================================================================
--- udd/udd/popcon_gatherer.py	2011-07-27 16:58:33 UTC (rev 1974)
+++ udd/udd/popcon_gatherer.py	2011-07-27 17:09:10 UTC (rev 1975)
@@ -90,9 +90,9 @@
       WHERE %(table)s.package = pkgs.package
       GROUP BY pkgs.source;
       """ % my_config)
-    cur.execute("ANALYZE " + table)
-    cur.execute("ANALYZE " + table_src)
-    cur.execute("ANALYZE " + table_src_average)
+    cur.execute("VACUUM ANALYZE " + table)
+    cur.execute("VACUUM ANALYZE " + table_src)
+    cur.execute("VACUUM ANALYZE " + table_src_average)
 
 if __name__ == '__main__':
   main()

Modified: udd/udd/pts_gatherer.py
===================================================================
--- udd/udd/pts_gatherer.py	2011-07-27 16:58:33 UTC (rev 1974)
+++ udd/udd/pts_gatherer.py	2011-07-27 17:09:10 UTC (rev 1975)
@@ -36,5 +36,5 @@
         c.execute("EXECUTE pts_insert(%s, %s)", (package, sub))
 
     c.execute("DEALLOCATE pts_insert")
-    c.execute("ANALYZE pts")
+    c.execute("VACUUM ANALYZE pts")
 

Modified: udd/udd/removals_gatherer.py
===================================================================
--- udd/udd/removals_gatherer.py	2011-07-27 16:58:33 UTC (rev 1974)
+++ udd/udd/removals_gatherer.py	2011-07-27 17:09:10 UTC (rev 1975)
@@ -108,7 +108,7 @@
                                quote(batch_removal.requestor),
                                quote(batch_removal.reasons)))
         cur.execute('DEALLOCATE batch_removals_insert')
-        cur.execute("ANALYZE %s" % pkg_removal_batch_table)
+        cur.execute("VACUUM ANALYZE %s" % pkg_removal_batch_table)
 
         # insert data for removals of individual packages
         cur.execute('PREPARE pkg_removal_insert ' \
@@ -121,7 +121,7 @@
                                 % (i, quote(pkg.name), quote(pkg.version),
                                     quote("{%s}" % ",".join(pkg.arches))))
         cur.execute('DEALLOCATE pkg_removal_insert')
-        cur.execute("ANALYZE %s" % pkg_removal_table)
+        cur.execute("VACUUM ANALYZE %s" % pkg_removal_table)
 
 def test(filename, removal_batches):
     """compare the number of parsed packages against those counted with a

Modified: udd/udd/screenshot_gatherer.py
===================================================================
--- udd/udd/screenshot_gatherer.py	2011-07-27 16:58:33 UTC (rev 1974)
+++ udd/udd/screenshot_gatherer.py	2011-07-27 17:09:10 UTC (rev 1975)
@@ -70,7 +70,7 @@
         print >>stderr, "Unable to inject data for package %s. %s" % (res['name'], err)
         print >>stderr,  "-->", res
     cur.execute("DEALLOCATE screenshots_insert")
-    cur.execute("ANALYZE %s" % my_config['table'])
+    cur.execute("VACUUM ANALYZE %s" % my_config['table'])
 
 if __name__ == '__main__':
   main()

Modified: udd/udd/sources_gatherer.py
===================================================================
--- udd/udd/sources_gatherer.py	2011-07-27 16:58:33 UTC (rev 1974)
+++ udd/udd/sources_gatherer.py	2011-07-27 17:09:10 UTC (rev 1975)
@@ -185,8 +185,8 @@
       cur.execute("DEALLOCATE source_insert")
       cur.execute("DEALLOCATE uploader_insert")
 
-    cur.execute('ANALYZE %s' % table)
-    cur.execute('ANALYZE %s' % utable)
+    cur.execute('VACUUM ANALYZE %s' % table)
+    cur.execute('VACUUM ANALYZE %s' % utable)
 
     self.print_warnings()
 

Modified: udd/udd/testing_migrations_gatherer.py
===================================================================
--- udd/udd/testing_migrations_gatherer.py	2011-07-27 16:58:33 UTC (rev 1974)
+++ udd/udd/testing_migrations_gatherer.py	2011-07-27 17:09:10 UTC (rev 1975)
@@ -52,5 +52,5 @@
          % (package, in_testing, testing_version, in_unstable, unstable_version, sync, sync_version, first_seen))
 
     c.execute("DEALLOCATE mig_insert")
-    c.execute("ANALYZE migrations")
+    c.execute("VACUUM ANALYZE migrations")
 

Modified: udd/udd/ubuntu_bugs_gatherer.py
===================================================================
--- udd/udd/ubuntu_bugs_gatherer.py	2011-07-27 16:58:33 UTC (rev 1974)
+++ udd/udd/ubuntu_bugs_gatherer.py	2011-07-27 17:09:10 UTC (rev 1975)
@@ -59,11 +59,11 @@
       except Empty:
         if httpq.qsize() == 0:
           ok = False
-    c.execute("analyze ubuntu_bugs_subscribers")
-    c.execute("analyze ubuntu_bugs_duplicates")
-    c.execute("analyze ubuntu_bugs_tags")
-    c.execute("analyze ubuntu_bugs_tasks")
-    c.execute("analyze ubuntu_bugs")
+    c.execute("VACUUM ANALYZE ubuntu_bugs_subscribers")
+    c.execute("VACUUM ANALYZE ubuntu_bugs_duplicates")
+    c.execute("VACUUM ANALYZE ubuntu_bugs_tags")
+    c.execute("VACUUM ANALYZE ubuntu_bugs_tasks")
+    c.execute("VACUUM ANALYZE ubuntu_bugs")
 
   def fetch_all_bugs(self):
     fh = urllib.urlopen('https://launchpad.net/ubuntu/+bugs-text')

Modified: udd/udd/upload_history_gatherer.py
===================================================================
--- udd/udd/upload_history_gatherer.py	2011-07-27 16:58:33 UTC (rev 1974)
+++ udd/udd/upload_history_gatherer.py	2011-07-27 17:09:10 UTC (rev 1975)
@@ -192,9 +192,9 @@
       
     cursor.execute("DEALLOCATE uh_insert")
     if self.is_debian:
-      cursor.execute("ANALYZE " + self.my_config['table'] + '_architecture')
+      cursor.execute("VACUUM ANALYZE " + self.my_config['table'] + '_architecture')
     if self.is_ubuntu:
-      cursor.execute("ANALYZE " + self.my_config['table'] + '_launchpad_closes')
+      cursor.execute("VACUUM ANALYZE " + self.my_config['table'] + '_launchpad_closes')
 
-    cursor.execute("ANALYZE " + self.my_config['table'] + '_closes')
-    cursor.execute("ANALYZE " + self.my_config['table'])
+    cursor.execute("VACUUM ANALYZE " + self.my_config['table'] + '_closes')
+    cursor.execute("VACUUM ANALYZE " + self.my_config['table'])

Modified: udd/udd/wannabuild_gatherer.py
===================================================================
--- udd/udd/wannabuild_gatherer.py	2011-07-27 16:58:33 UTC (rev 1974)
+++ udd/udd/wannabuild_gatherer.py	2011-07-27 17:09:10 UTC (rev 1975)
@@ -44,7 +44,7 @@
         cur.executemany("EXECUTE wb_insert (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)", entries)
         entries = []
     cur.execute("DEALLOCATE wb_insert")
-    cur.execute("ANALYZE wannabuild")
+    cur.execute("VACUUM ANALYZE wannabuild")
 
 if __name__ == '__main__':
   main()




More information about the Collab-qa-commits mailing list