Closed
Bug 290677
Opened 20 years ago
Closed 20 years ago
Index rename time estimate is too short on large sites
Categories
(Bugzilla :: Installation & Upgrading, defect, P1)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.20
People
(Reporter: bugreport, Assigned: mkanat)
Details
(Whiteboard: [wanted for 2.20])
Attachments
(1 file, 2 obsolete files)
4.39 KB,
patch
|
mkanat
:
review+
|
Details | Diff | Splinter Review |
On an Ultra-80 using a fiber-channel to a SAN, Mysql4.0 with a shadows DB....
Checksetup announces that the index renames will take about 7 minutes. It takes
more like 5 hours. This is mainly due to the monster (13GB) attachment table
where mysql creates a temp table for each index dropped and each index created.
I have already tried this with each table write-locked and with keys diasbled on
each table before the renames and neither helps. Since this is a one-time
issue, I am inclined not to worry too much about optimizing it. We should just
fix the estimate so large site administrators are warned.
Assignee | ||
Updated•20 years ago
|
Flags: blocking2.20?
Target Milestone: --- → Bugzilla 2.20
Reporter | ||
Comment 1•20 years ago
|
||
Actually, I can do these 5 operations at once in the same time it takes to do
just one of them by itself.....
alter table attachments drop index bug_id, drop index creation_ts, add index
attachments_creation_ts_idx (creation_ts), add index attachments_bug_id_idx (
bug_id ), add index attachments_submitter_id_idx (submitter_id);Query OK, 17727
rows affected (56 min 57.82 sec)
Records: 17727 Duplicates: 0 Warnings: 0
Assignee | ||
Updated•20 years ago
|
OS: Solaris → All
Priority: -- → P1
Hardware: Sun → All
Comment 2•20 years ago
|
||
"If it's not a regression from 2.18 and it's not a critical problem with
something that's already landed, let's push it off." - Dave
Flags: blocking2.20?
Updated•20 years ago
|
Whiteboard: [wanted for 2.20]
Updated•20 years ago
|
Flags: blocking2.20-
Assignee | ||
Comment 3•20 years ago
|
||
Hey Joel, here's some new code that seems to be *waaaay* faster at renaming the
indexes. I don't have a huge DB to test with, but even on landfill it's really
fast.
Also, I factored in the size of the attachments table for the time estimate on
renames.
Assignee | ||
Updated•20 years ago
|
Attachment #183048 -
Flags: review?(bugreport)
Assignee | ||
Comment 4•20 years ago
|
||
Comment on attachment 183048 [details] [diff] [review]
Faster Index Renaming with more accurate estimate
I only really need joel to do the actual timing check (since he has a large
DB), but I think Jouni might be more around to do the review. :-)
Are you around, Jouni? :-) You initially reviewed this code, so this should be
fairly easy.
Also, if you have a large DB to test with, then I don't also need the review
from Joel.
Attachment #183048 -
Flags: review?(jouni)
Assignee | ||
Updated•20 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 5•20 years ago
|
||
OK, there was a slight error, where I was obliterating the $rename_time value
instead of adding to it. :-)
Attachment #183048 -
Attachment is obsolete: true
Attachment #183050 -
Flags: review?(jouni)
Assignee | ||
Updated•20 years ago
|
Attachment #183048 -
Flags: review?(jouni)
Attachment #183048 -
Flags: review?(bugreport)
Reporter | ||
Comment 6•20 years ago
|
||
Close, but no cigar ....
Checking perl modules ...
Checking for AppConfig (v1.52) ok: found v1.56
Checking for CGI (v2.93) ok: found v3.05
Checking for Data::Dumper (any) ok: found v2.121
Checking for Date::Format (v2.21) ok: found v2.22
Checking for DBI (v1.38) ok: found v1.42
Checking for DBD::mysql (v2.9003) ok: found v2.9003
Checking for File::Spec (v0.82) ok: found v0.87
Checking for File::Temp (any) ok: found v0.14
Checking for Template (v2.08) ok: found v2.13
Checking for Text::Wrap (v2001.0131) ok: found v2001.09291
Checking for Mail::Mailer (v1.65) ok: found v1.66
Checking for Storable (any) ok: found v2.09
The following Perl modules are optional:
Checking for GD (v1.20) ok: found v1.41
Checking for Chart::Base (v1.0) ok: found v2.3
Checking for XML::Parser (any) not found
Checking for GD::Graph (any) ok: found v1.43
Checking for GD::Text::Align (any) ok: found v1.18
Checking for PatchReader (v0.9.4) not found
If you want to use the bug import/export feature to move bugs to
or from other bugzilla installations, you will need to install
the XML::Parser module by running (as root):
/usr/bin/perl -MCPAN -e 'install "XML::Parser"'
If you want to see pretty HTML views of patches, you should install the
PatchReader module:
PatchReader: /usr/bin/perl -MCPAN -e 'install "PatchReader"'
Checking user setup ...
The following settings in your localconfig file are no longer used:
@severities, @priorities, @opsys, @platforms
This data is now controlled through the Bugzilla administrative interface.
We recommend you remove these settings from localconfig after checksetup
runs successfully.
The $mysqlpath setting in your localconfig file is no longer required.
We recommend you remove it.
Removing existing compiled templates ...
Precompiling templates ...
Checking for MySQL (v3.23.41) ok: found v4.0.18-max-log
We are about to rename old indexes.
The estimated time to complete renaming is 81 minutes.
You cannot interrupt this action once it has begun.
If you would like to cancel, press Ctrl-C now... (Waiting 45 seconds...)
Renaming indexes...
Renaming index bug_id to attachments_bug_id_idx...
Renaming index creation_ts to attachments_creation_ts_idx...
Renaming index bug_id to bug_group_map_bug_id_idx...
Renaming index group_id to bug_group_map_group_id_idx...
Renaming index priority to bugs_priority_idx...
Renaming index reporter to bugs_reporter_idx...
Renaming index product_id to bugs_product_id_idx...
Renaming index creation_ts to bugs_creation_ts_idx...
Renaming index assigned_to to bugs_assigned_to_idx...
Renaming index qa_contact to bugs_qa_contact_idx...
Renaming index votes to bugs_votes_idx...
Renaming index bug_severity to bugs_bug_severity_idx...
Renaming index bug_status to bugs_bug_status_idx...
Renaming index delta_ts to bugs_delta_ts_idx...
Renaming index version to bugs_version_idx...
Renaming index component_id to bugs_component_id_idx...
Renaming index resolution to bugs_resolution_idx...
Renaming index target_milestone to bugs_target_milestone_idx...
Renaming index alias to bugs_alias_idx...
Renaming index op_sys to bugs_op_sys_idx...
Renaming index bug_id to bugs_activity_bug_id_idx...
Renaming index bug_when to bugs_activity_bug_when_idx...
Renaming index fieldid to bugs_activity_fieldid_idx...
Renaming index bug_id to cc_bug_id_idx...
Renaming index who to cc_who_idx...
Renaming index dts_id to components_dts_id_idx...
Renaming index product_id to components_product_id_idx...
Renaming index name to components_name_idx...
Renaming index id to cvscop_bugrefs_id_idx...
Renaming index ts to cvscop_changes_ts_idx...
Renaming index id to cvscop_files_id_idx...
Renaming index name to cvscop_files_name_idx...
Renaming index blocked to dependencies_blocked_idx...
Renaming index dependson to dependencies_dependson_idx...
Renaming index sortkey to fielddefs_sortkey_idx...
Renaming index name to fielddefs_name_idx...
Renaming index type_id to flagexclusions_type_id_idx...
Renaming index type_id to flaginclusions_type_id_idx...
Renaming index bug_id to flags_bug_id_idx...
Renaming index setter_id to flags_setter_id_idx...
Renaming index requestee_id to flags_requestee_id_idx...
Renaming index product_id to group_control_map_product_id_idx...
Renaming index group_id to group_control_map_group_id_idx...
Renaming index member_id to group_group_map_member_id_idx...
Renaming index name to groups_name_idx...
Renaming index name to keyworddefs_name_idx...
Renaming index keywordid to keywords_keywordid_idx...
Renaming index bug_id to keywords_bug_id_idx...
Renaming index lastused to logincookies_lastused_idx...
Renaming index bug_id to longdescs_bug_id_idx...
Renaming index bug_when to longdescs_bug_when_idx...
Renaming index who to longdescs_who_idx...
Renaming index product_id to milestones_product_id_idx...
Renaming index userid to namedqueries_userid_idx...
Renaming index name to products_name_idx...
Renaming index login_name to profiles_login_name_idx...
Renaming index userid to profiles_activity_userid_idx...
Renaming index profiles_when to profiles_activity_profiles_when_idx...
Renaming index fieldid to profiles_activity_fieldid_idx...
Renaming index attach_id to release_map_attach_id_idx...
Renaming index component_id to release_map_component_id_idx...
Renaming index reflected to shadowlog_reflected_idx...
Renaming index userid to tokens_userid_idx...
Renaming index user_id to user_group_map_user_id_idx...
Renaming index bug_id to votes_bug_id_idx...
Renaming index who to votes_who_idx...
Renaming index watcher to watch_watcher_idx...
Renaming index watched to watch_watched_idx...
Building Schema object from database...
Adding new table bz_schema ...
Initializing the new Schema storage...
Adding new table bug_severity ...
Adding new table bug_status ...
Adding new table category_group_map ...
Adding new table classifications ...
Adding new table email_setting ...
Adding new table op_sys ...
Adding new table priority ...
Adding new table profile_setting ...
Adding new table rep_platform ...
Adding new table resolution ...
Adding new table series ...
Adding new table series_categories ...
Adding new table series_data ...
Adding new table setting ...
Adding new table setting_value ...
Adding new table whine_events ...
Adding new table whine_queries ...
Adding new table whine_schedules ...
Updating column lastused in table logincookies ...
Old: TIMESTAMP
New: datetime NOT NULL
Updating column delta_ts in table bugs ...
Old: TIMESTAMP
New: datetime NOT NULL
Inserting value 'blocker' in table bug_severity with sortkey 100...
Inserting value 'critical' in table bug_severity with sortkey 200...
Inserting value 'major' in table bug_severity with sortkey 300...
Inserting value 'normal' in table bug_severity with sortkey 400...
Inserting value 'minor' in table bug_severity with sortkey 500...
Inserting value 'trivial' in table bug_severity with sortkey 600...
Inserting value 'enhancement' in table bug_severity with sortkey 700...
Inserting value 'P1' in table priority with sortkey 100...
Inserting value 'P2' in table priority with sortkey 200...
Inserting value 'P3' in table priority with sortkey 300...
Inserting value 'P4' in table priority with sortkey 400...
Inserting value 'P5' in table priority with sortkey 500...
Inserting value 'P6' in table priority with sortkey 600...
Inserting value 'Other' in table op_sys with sortkey 100...
Inserting value 'Problem' in table op_sys with sortkey 200...
Inserting value 'NewFeature' in table op_sys with sortkey 300...
Inserting value 'NFD' in table op_sys with sortkey 400...
Inserting value 'Action' in table op_sys with sortkey 500...
Inserting value 'All' in table rep_platform with sortkey 100...
Inserting value '3' in table rep_platform with sortkey 200...
Inserting value 'v3' in table rep_platform with sortkey 300...
Inserting value 'v6' in table rep_platform with sortkey 400...
Inserting value 'v12' in table rep_platform with sortkey 500...
Inserting value 'chagall' in table rep_platform with sortkey 600...
Inserting value 'miro' in table rep_platform with sortkey 700...
Inserting value 'monet' in table rep_platform with sortkey 800...
Inserting value 'picasso' in table rep_platform with sortkey 900...
Inserting value 'Other' in table rep_platform with sortkey 1000...
Inserting value 'csm1/2' in table rep_platform with sortkey 1100...
Inserting value 'UNCONFIRMED' in table bug_status with sortkey 100...
Inserting value 'NEW' in table bug_status with sortkey 200...
Inserting value 'ASSIGNED' in table bug_status with sortkey 300...
Inserting value 'REOPENED' in table bug_status with sortkey 400...
Inserting value 'RESOLVED' in table bug_status with sortkey 500...
Inserting value 'VERIFIED' in table bug_status with sortkey 600...
Inserting value 'CLOSED' in table bug_status with sortkey 700...
Inserting value '' in table resolution with sortkey 100...
Inserting value 'FIXED' in table resolution with sortkey 200...
Inserting value 'INVALID' in table resolution with sortkey 300...
Inserting value 'WONTFIX' in table resolution with sortkey 400...
Inserting value 'LATER' in table resolution with sortkey 500...
Inserting value 'REMIND' in table resolution with sortkey 600...
Inserting value 'DUPLICATE' in table resolution with sortkey 700...
Inserting value 'WORKSFORME' in table resolution with sortkey 800...
Inserting value 'MOVED' in table resolution with sortkey 900...
Updating column cryptpassword in table profiles ...
Old: varchar(34)
New: varchar(128)
Adding new column deadline to table bugs ...
Migrating old chart data into database ...
Adding new column grant_type to table user_group_map ...
Deleting unused column isderived from table user_group_map ...
Removing index 'user_group_map_user_id_idx' from the user_group_map table...
Adding new index 'user_group_map_user_id_idx' to the user_group_map table ...
Adding new column is_active to table flags ...
Adding new column grant_type to table group_group_map ...
Removing index 'group_group_map_member_id_idx' from the group_group_map table...
Deleting unused column isbless from table group_group_map ...
Adding new index 'group_group_map_member_id_idx' to the group_group_map table ...
Adding new column extern_id to table profiles ...
Adding new column grant_group_id to table flagtypes ...
Adding new column request_group_id to table flagtypes ...
Adding new column already_wrapped to table longdescs ...
Fixing old, mis-wrapped comments...
Updating column bug_status in table bugs ...
Old: ENUM NOT NULL DEFAULT 'UNCONFIRMED'
New: varchar(64) NOT NULL
Updating column resolution in table bugs ...
Old: ENUM NOT NULL DEFAULT ''
New: varchar(64) NOT NULL DEFAULT ''
Updating column priority in table bugs ...
Old: ENUM NOT NULL DEFAULT 'P1'
New: varchar(64) NOT NULL
Updating column bug_severity in table bugs ...
Old: ENUM NOT NULL DEFAULT 'blocker'
New: varchar(64) NOT NULL
Updating column rep_platform in table bugs ...
Old: ENUM
New: varchar(64) NOT NULL
Updating column op_sys in table bugs ...
Old: ENUM NOT NULL DEFAULT 'Other'
New: varchar(64) NOT NULL
Updating column userid in table quips ...
Old: mediumint NOT NULL
New: mediumint
Changing owner to NULL for quips where the owner is unknown...
Adding new column obsolete to table fielddefs ...
Marking qacontact_accessible and assignee_accessible as obsolete fields...
Adding full-text index for short_desc column in bugs table...
Adding new index 'bugs_short_desc_idx' to the bugs table ...
Adding full-text index for thetext column in longdescs table...
Adding new index 'longdescs_thetext_idx' to the longdescs table ...
Dropping table shadowlog...
Changing column count in table votes to be named vote_count...
Updating column short_desc in table bugs ...
Old: mediumtext
New: mediumtext NOT NULL
Adding new column classification_id to table products ...
Adding new index 'attachments_submitter_id_idx' to the attachments table ...
DBD::mysql::db do failed: Got error 28 from table handler at Bugzilla/DB.pm line 451
Bugzilla::DB::bz_add_index_raw('Bugzilla::DB::Mysql=HASH(0xee0db4)','attachments','attachments_submitter_id_idx','ARRAY(0x10600f4)')
called at Bugzilla/DB.pm line 424
Bugzilla::DB::bz_add_index('Bugzilla::DB::Mysql=HASH(0xee0db4)','attachments','attachments_submitter_id_idx','ARRAY(0x10600f4)')
called at ./checksetup.pl line 3756
Assignee | ||
Comment 7•20 years ago
|
||
(In reply to comment #6)
> Adding new index 'attachments_submitter_id_idx' to the attachments table ...
> DBD::mysql::db do failed: Got error 28 from table handler at Bugzilla/DB.pm
> line 451
From http://www.ozoneasylum.com/5324 --
"It means that your hard disk is full (probably in your MySQL database but it
could be elsewhere and interfering with the free running of your database)"
Reporter | ||
Comment 8•20 years ago
|
||
Doh! You're right.
I guess 6 concurrent copies of my database is a bit much. I'll retry.
Reporter | ||
Comment 9•20 years ago
|
||
Much better.... (amazing what adequate disk space does) :-)
We are about to rename old indexes.
The estimated time to complete renaming is 81 minutes.
You cannot interrupt this action once it has begun.
If you would like to cancel, press Ctrl-C now... (Waiting 45 seconds...)
Wed May 11 07:00:04 PDT 2005
Renaming indexes...
Renaming index bug_id to attachments_bug_id_idx...
Renaming index creation_ts to attachments_creation_ts_idx...
Wed May 11 07:01:04 PDT 2005
Wed May 11 07:35:04 PDT 2005
Wed May 11 07:36:04 PDT 2005
Renaming index bug_id to bug_group_map_bug_id_idx...
Renaming index group_id to bug_group_map_group_id_idx...
Renaming index priority to bugs_priority_idx...
Renaming index reporter to bugs_reporter_idx...
Renaming index product_id to bugs_product_id_idx...
Renaming index creation_ts to bugs_creation_ts_idx...
Renaming index assigned_to to bugs_assigned_to_idx...
Renaming index qa_contact to bugs_qa_contact_idx...
Renaming index votes to bugs_votes_idx...
Renaming index bug_severity to bugs_bug_severity_idx...
Renaming index bug_status to bugs_bug_status_idx...
Renaming index delta_ts to bugs_delta_ts_idx...
Renaming index version to bugs_version_idx...
Renaming index component_id to bugs_component_id_idx...
Renaming index resolution to bugs_resolution_idx...
Renaming index target_milestone to bugs_target_milestone_idx...
Renaming index alias to bugs_alias_idx...
Renaming index op_sys to bugs_op_sys_idx...
Renaming index bug_id to bugs_activity_bug_id_idx...
Renaming index bug_when to bugs_activity_bug_when_idx...
Renaming index fieldid to bugs_activity_fieldid_idx...
Renaming index bug_id to cc_bug_id_idx...
Renaming index who to cc_who_idx...
Renaming index dts_id to components_dts_id_idx...
Renaming index product_id to components_product_id_idx...
Renaming index name to components_name_idx...
Renaming index id to cvscop_bugrefs_id_idx...
Renaming index ts to cvscop_changes_ts_idx...
Renaming index id to cvscop_files_id_idx...
Renaming index name to cvscop_files_name_idx...
Renaming index blocked to dependencies_blocked_idx...
Renaming index dependson to dependencies_dependson_idx...
Renaming index sortkey to fielddefs_sortkey_idx...
Renaming index name to fielddefs_name_idx...
Renaming index type_id to flagexclusions_type_id_idx...
Renaming index type_id to flaginclusions_type_id_idx...
Renaming index bug_id to flags_bug_id_idx...
Renaming index setter_id to flags_setter_id_idx...
Renaming index requestee_id to flags_requestee_id_idx...
Renaming index product_id to group_control_map_product_id_idx...
Renaming index group_id to group_control_map_group_id_idx...
Renaming index member_id to group_group_map_member_id_idx...
Renaming index name to groups_name_idx...
Renaming index name to keyworddefs_name_idx...
Renaming index keywordid to keywords_keywordid_idx...
Renaming index bug_id to keywords_bug_id_idx...
Renaming index lastused to logincookies_lastused_idx...
Renaming index bug_id to longdescs_bug_id_idx...
Renaming index bug_when to longdescs_bug_when_idx...
Renaming index who to longdescs_who_idx...
Renaming index product_id to milestones_product_id_idx...
Renaming index userid to namedqueries_userid_idx...
Renaming index name to products_name_idx...
Renaming index login_name to profiles_login_name_idx...
Renaming index userid to profiles_activity_userid_idx...
Renaming index profiles_when to profiles_activity_profiles_when_idx...
Renaming index fieldid to profiles_activity_fieldid_idx...
Renaming index attach_id to release_map_attach_id_idx...
Renaming index component_id to release_map_component_id_idx...
Renaming index reflected to shadowlog_reflected_idx...
Renaming index userid to tokens_userid_idx...
Renaming index user_id to user_group_map_user_id_idx...
Renaming index bug_id to votes_bug_id_idx...
Renaming index who to votes_who_idx...
Renaming index watcher to watch_watcher_idx...
Renaming index watched to watch_watched_idx...
Building Schema object from database...
Wed May 11 07:37:04 PDT 2005
Adding new table bz_schema ...
Initializing the new Schema storage...
Adding new table bug_severity ...
Adding new table bug_status ...
Adding new table category_group_map ...
Adding new table classifications ...
Adding new table email_setting ...
Adding new table op_sys ...
Adding new table priority ...
Adding new table profile_setting ...
Adding new table rep_platform ...
Adding new table resolution ...
Adding new table series ...
Adding new table series_categories ...
Adding new table series_data ...
Adding new table setting ...
Adding new table setting_value ...
Adding new table whine_events ...
Adding new table whine_queries ...
Adding new table whine_schedules ...
Updating column lastused in table logincookies ...
Old: TIMESTAMP
New: datetime NOT NULL
Updating column delta_ts in table bugs ...
Old: TIMESTAMP
New: datetime NOT NULL
Inserting value 'blocker' in table bug_severity with sortkey 100...
Inserting value 'critical' in table bug_severity with sortkey 200...
Inserting value 'major' in table bug_severity with sortkey 300...
Inserting value 'normal' in table bug_severity with sortkey 400...
Inserting value 'minor' in table bug_severity with sortkey 500...
Inserting value 'trivial' in table bug_severity with sortkey 600...
Inserting value 'enhancement' in table bug_severity with sortkey 700...
Inserting value 'P1' in table priority with sortkey 100...
Inserting value 'P2' in table priority with sortkey 200...
Inserting value 'P3' in table priority with sortkey 300...
Inserting value 'P4' in table priority with sortkey 400...
Inserting value 'P5' in table priority with sortkey 500...
Inserting value 'P6' in table priority with sortkey 600...
Inserting value 'Other' in table op_sys with sortkey 100...
Inserting value 'Problem' in table op_sys with sortkey 200...
Inserting value 'NewFeature' in table op_sys with sortkey 300...
Inserting value 'NFD' in table op_sys with sortkey 400...
Inserting value 'Action' in table op_sys with sortkey 500...
Inserting value 'All' in table rep_platform with sortkey 100...
Inserting value '3' in table rep_platform with sortkey 200...
Inserting value 'v3' in table rep_platform with sortkey 300...
Inserting value 'v6' in table rep_platform with sortkey 400...
Inserting value 'v12' in table rep_platform with sortkey 500...
Inserting value 'chagall' in table rep_platform with sortkey 600...
Inserting value 'miro' in table rep_platform with sortkey 700...
Inserting value 'monet' in table rep_platform with sortkey 800...
Inserting value 'picasso' in table rep_platform with sortkey 900...
Inserting value 'Other' in table rep_platform with sortkey 1000...
Inserting value 'csm1/2' in table rep_platform with sortkey 1100...
Inserting value 'UNCONFIRMED' in table bug_status with sortkey 100...
Inserting value 'NEW' in table bug_status with sortkey 200...
Inserting value 'ASSIGNED' in table bug_status with sortkey 300...
Inserting value 'REOPENED' in table bug_status with sortkey 400...
Inserting value 'RESOLVED' in table bug_status with sortkey 500...
Inserting value 'VERIFIED' in table bug_status with sortkey 600...
Inserting value 'CLOSED' in table bug_status with sortkey 700...
Inserting value '' in table resolution with sortkey 100...
Inserting value 'FIXED' in table resolution with sortkey 200...
Inserting value 'INVALID' in table resolution with sortkey 300...
Inserting value 'WONTFIX' in table resolution with sortkey 400...
Inserting value 'LATER' in table resolution with sortkey 500...
Inserting value 'REMIND' in table resolution with sortkey 600...
Inserting value 'DUPLICATE' in table resolution with sortkey 700...
Inserting value 'WORKSFORME' in table resolution with sortkey 800...
Inserting value 'MOVED' in table resolution with sortkey 900...
Updating column cryptpassword in table profiles ...
Old: varchar(34)
New: varchar(128)
Adding new column deadline to table bugs ...
Migrating old chart data into database ...
Adding new column grant_type to table user_group_map ...
Deleting unused column isderived from table user_group_map ...
Removing index 'user_group_map_user_id_idx' from the user_group_map table...
Adding new index 'user_group_map_user_id_idx' to the user_group_map table ...
Adding new column is_active to table flags ...
Adding new column grant_type to table group_group_map ...
Removing index 'group_group_map_member_id_idx' from the group_group_map table...
Deleting unused column isbless from table group_group_map ...
Adding new index 'group_group_map_member_id_idx' to the group_group_map table ...
Adding new column extern_id to table profiles ...
Adding new column grant_group_id to table flagtypes ...
Adding new column request_group_id to table flagtypes ...
Adding new column already_wrapped to table longdescs ...
Wed May 11 07:38:05 PDT 2005
Fixing old, mis-wrapped comments...
Wed May 11 07:39:05 PDT 2005
Updating column bug_status in table bugs ...
Old: ENUM NOT NULL DEFAULT 'UNCONFIRMED'
New: varchar(64) NOT NULL
Updating column resolution in table bugs ...
Old: ENUM NOT NULL DEFAULT ''
New: varchar(64) NOT NULL DEFAULT ''
Updating column priority in table bugs ...
Old: ENUM NOT NULL DEFAULT 'P1'
New: varchar(64) NOT NULL
Wed May 11 07:40:05 PDT 2005
Updating column bug_severity in table bugs ...
Old: ENUM NOT NULL DEFAULT 'blocker'
New: varchar(64) NOT NULL
Updating column rep_platform in table bugs ...
Old: ENUM
New: varchar(64) NOT NULL
Updating column op_sys in table bugs ...
Old: ENUM NOT NULL DEFAULT 'Other'
New: varchar(64) NOT NULL
Updating column userid in table quips ...
Old: mediumint NOT NULL
New: mediumint
Changing owner to NULL for quips where the owner is unknown...
Adding new column obsolete to table fielddefs ...
Marking qacontact_accessible and assignee_accessible as obsolete fields...
Adding full-text index for short_desc column in bugs table...
Adding new index 'bugs_short_desc_idx' to the bugs table ...
Adding full-text index for thetext column in longdescs table...
Adding new index 'longdescs_thetext_idx' to the longdescs table ...
Wed May 11 07:41:05 PDT 2005
Wed May 11 07:42:05 PDT 2005
Dropping table shadowlog...
Changing column count in table votes to be named vote_count...
Updating column short_desc in table bugs ...
Old: mediumtext
New: mediumtext NOT NULL
Adding new column classification_id to table products ...
Adding new index 'attachments_submitter_id_idx' to the attachments table ...
Wed May 11 07:43:05 PDT 2005
<snip>
Wed May 11 08:42:06 PDT 2005
Wed May 11 08:43:06 PDT 2005
Wed May 11 08:44:06 PDT 2005
Adding new index 'bugs_activity_who_idx' to the bugs_activity table ...
Updating column lastdiffed in table bugs ...
Old: datetime NOT NULL
New: datetime
Wed May 11 08:45:06 PDT 2005
Updating column qa_contact in table bugs ...
Old: mediumint NOT NULL
New: mediumint
Updating column initialqacontact in table components ...
Old: mediumint NOT NULL
New: mediumint
Migrating email preferences to new table ...
Wed May 11 08:46:06 PDT 2005
Deleting unused column emailflags from table profiles ...
Updating column public in table series ...
New: tinyint NOT NULL DEFAULT 0
Updating column isactive in table bug_status ...
New: tinyint NOT NULL DEFAULT 1
Updating column isactive in table rep_platform ...
New: tinyint NOT NULL DEFAULT 1
Updating column isactive in table resolution ...
New: tinyint NOT NULL DEFAULT 1
Updating column isactive in table op_sys ...
New: tinyint NOT NULL DEFAULT 1
Updating column isactive in table bug_severity ...
New: tinyint NOT NULL DEFAULT 1
Updating column isactive in table priority ...
New: tinyint NOT NULL DEFAULT 1
Updating column approved in table quips ...
New: tinyint NOT NULL DEFAULT 1
Adding new index 'flags_type_id_idx' to the flags table ...
Updating column value in table versions ...
Old: tinytext
New: varchar(64) NOT NULL
Adding new index 'versions_product_id_idx' to the versions table ...
Adding group editclassifications ...
Adding group bz_canusewhines ...
Adding group bz_canusewhineatothers ...
Adding a new user setting called 'display_quips'
Adding a new user setting called 'comment_sort_order'
sh-2.05$ Wed May 11 08:47:06 PDT 2005
Comment 10•20 years ago
|
||
Comment on attachment 183050 [details] [diff] [review]
v1.1
>Index: Bugzilla/DB/Mysql.pm
>===================================================================
>+ # And one hour per 15,000 attachments, per some actual experiments.
Nit: "For every 15,000 attachments" would be more readable for me.
>+ $rename_time += int(($attachment_count * 60) / 15000);
Nit: Although this calculates correctly, it would be better to write this as
$rename_time += int(($attachment_count / 15000) * 60);
... since it much better reflects the contents of the comment above.
>+ my %rename_indexes;
Nit: You might want to add a comment ("The indexes going to be renamed for this
table; keys are column names, values are index objects") or rename the variable
accordingly ("indexes_to_be_renamed_by_column_name")
>Index: Bugzilla/DB/Schema/Mysql.pm
>===================================================================
>+# Index renames is a hash, where the key is a string - the
>+# old names of the index, and the value is a hash - the index
>+# definition that we're renaming to, with an extra key of "NAME"
>+# that contains the new index name.
Fix the start of this comment to make it clear which hash we're talking about
("The %indexes param" or whatever).
Note that this code executes an empty ALTER TABLE statement for tables with no
indices... but since MySQL has no problem with it, I guess that's ok.
r=jouni
Attachment #183050 -
Flags: review?(jouni) → review+
Assignee | ||
Comment 11•20 years ago
|
||
(In reply to comment #10)
> >+ $rename_time += int(($attachment_count * 60) / 15000);
>
> Nit: Although this calculates correctly, it would be better to write this as
>
> $rename_time += int(($attachment_count / 15000) * 60);
>
> ... since it much better reflects the contents of the comment above.
I did that out of habit from C being my first language, where
$attachment_count / 15000 would have been truncated to 0 if attachments were
less than 15000, because it's integer math. I wasn't actually sure how perl
dealt with that, so I wrote it the way it is.
> Fix the start of this comment to make it clear which hash we're talking about
> ("The %indexes param" or whatever).
Yeah, will do. :-)
> Note that this code executes an empty ALTER TABLE statement for tables with no
> indices... but since MySQL has no problem with it, I guess that's ok.
Hrm, still, we probably shouldn't do that. I'll change the code up a bit so
that we return nothing at all if there are no index renames to be done.
Assignee | ||
Comment 12•20 years ago
|
||
OK, I just addressed Jouni's nits, so I'm carrying forward r+.
I also changed the estimate for the attachments to 45 minutes per 15,000
attachments, to be more in line with Joel's results with this patch. (It would
still have been an overestimate, overall, for the time the index renames took
on his machine.)
Attachment #183050 -
Attachment is obsolete: true
Attachment #183599 -
Flags: review+
Assignee | ||
Updated•20 years ago
|
Flags: approval?
Updated•20 years ago
|
Flags: approval? → approval+
Assignee | ||
Comment 13•20 years ago
|
||
Checking in Bugzilla/DB/Mysql.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/DB/Mysql.pm,v <-- Mysql.pm
new revision: 1.20; previous revision: 1.19
done
Checking in Bugzilla/DB/Schema/Mysql.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/DB/Schema/Mysql.pm,v <-- Mysql.pm
new revision: 1.9; previous revision: 1.8
done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•