Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upstream upgrade #3

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open

upstream upgrade #3

wants to merge 29 commits into from

Conversation

kurtenbachkyle
Copy link

merge from #2 but from a branch and with whatever travis changes are necessary.

  • Adding logging for debugging slave lag
  • Add license information to lhm.gemspec
  • lhm.gemspec: set license to BSD-3-Clause
  • Update chunker requirements
  • Running tests requires ar and mysql
  • Truncate long trigger names
  • Adding failing test for potential data destruction
  • Attemp at fixing possible data loss
  • Improve readability of cleanup method calls
  • Fixes a minor typo in Readme
  • Add example in README for setting default values
  • Add more test
  • Fix chunker for forgotten lines
  • try updating ruby version

Camilo Lopez and others added 29 commits May 5, 2015 21:53
Set the license to New BSD
'BSD-3-Clause' is less ambiguous than 'New BSD' and it's also the url slug used by the opensource.org URL http://opensource.org/licenses/BSD-3-Clause
Add license information to lhm.gemspec
The chunker does not require an auto_increment column, it simply
requires an integer column in order to find the start/limit of the
table.

Relax the migrator/table checks to only look for an `id` INT column.
* Add support for BIGINT `id` columns
* Add fixture for BIGINT `id` column
* Add test for BIGINT `id` columns
* Add fixture for "broken" varchar `id` column
* Update specs
* Update README with changes, and note about sparse `id` data
…opment-gems

Running tests requires active_record and mysql
We are seeing:

    ==  SomeHorriblyLongMigrationInvolvingTablesWithNamesFarTooLongForHumanBeingsToConsiderReasonable: migrating
    I, [2015-07-15T12:07:08.972714 #47706]  INFO -- : Starting LHM run on table=lhmn_tables_with_names_far_too_long_for_human_beings_to_consider
    I, [2015-07-15T12:07:08.972868 #47706]  INFO -- : Starting run of class=Lhm::Migrator
    I, [2015-07-15T12:07:09.012700 #47706]  INFO -- : Starting run of class=Lhm::Entangler
    E, [2015-07-15T12:07:09.015775 #47706] ERROR -- : Error in class=Lhm::Entangler, reverting. exception=ActiveRecord::StatementInvalid message=Mysql2::Error: Identifier name 'lhmt_del_tables_with_names_far_too_long_for_human_beings_to_consider_reasonable' is too long: create trigger `lhmt_del_tables_with_names_far_too_long_for_human_beings_to_consider_reasonable`
    ...

It looks like this has already been faced in the migrator:

    def archive_name
      "lhma_#{ startstamp }_#{ @origin.name }"[0...64]
    end

So let's truncate here as well.
`cleanup(:run)` is more self-explanatory than `cleanup(true)`.
…gle_row_when_the_id_is_not_1_sc_master

Adding failing test and fix for potential data destruction
Improve readability of cleanup method calls
Add example in README for setting default values
Add test to check no line is forgotten when copying 5 lines with stride 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants