view · edit · sidebar · attach · print · history

20111205-debug-pointer-link-update_price_feeds-odba-data-corruption-oddb_org

<< Masa.20111206-testcases-new-sequence-button-odba-data-corruption-oddb_org | 2011 | Masa.20111202-debug-invoicers-migel-ruby193-debug-price-feeds-new-package-button-oddb_org >>


  1. Replace SL Eintrag link without pointer oddb.org
  2. Replace New Sequence button without link oddb.org
  3. Check error package data (update_price_feeds)
  4. Debug ODBA data corruption

Goal/Estimate/Evaluation
  • Debug pointer link (Sl-Eintrag, New Sequenz) oddb.org / 100% / 100%
  • Debug update_price_feeds oddb.org / 100% / 100%
  • Debug ODBA data corruption / 50% / 30%
Milestones
  1. Sl Eintrag - Bearbeiten
  2. New sequence button
  3. Fix error package data update_price_feeds
  4. (Fix new sequence button)
  5. (Testcases)
  6. ODBA data corruption

Commit


Replace SL Eintrag link without pointer oddb.org

Email

Problem

  • SL-Eintrag Bearbeiten link does not work

Task (Replace link)

Commit

Replace New Sequence button without link oddb.org

Task

  • Fix 'New Sequence' button
  • Replace the link without pointer

For example

Commit

Testcases

  • 2446 tests, 4664 assertions, 7 failures, 0 errors
  • Fix them later

Check error package data (update_price_feeds)

Email

Experiment

  • src/view/rss/package.rb
 class Package < HtmlGrid::Component
   include View::Latin1
   def to_html(context)
    RSS::Maker.make('2.0') { |feed|
 ...
      @model.each { |package|
 print "package.odba_id = "
 p package.odba_id

Run

  • bin/oddbd
  • bin/admin
masa@masa ~/ywesee/oddb.org $ bin/admin
ch.oddb> Updater.new(self).update_price_feeds

Result (console log)

...
package.odba_id = 27275008
package.odba_id = 26568007
package.odba_id = 26568030
failsafe rescued NoMethodError < StandardError
undefined method `limitation_text' for #<ODDB::Text::Chapter:0x7f5068c4fc10>
/home/masa/ywesee/oddb.org/src/util/oddbapp.rb:1472:in `_admin'
/usr/lib64/ruby/site_ruby/1.8/odba/stub.rb:112:in `method_missing'
/home/masa/ywesee/oddb.org/src/model/package.rb:238:in `limitation_text'

Check package

ch.oddb> ODBA.cache.fetch('26568030')
-> #<ODDB::Package:0x7f5069947710>
ch.oddb> ODBA.cache.fetch('26568030').iksnr
-> 61309
ch.oddb> ODBA.cache.fetch('26568030').seqnr
-> 02
ch.oddb> ODBA.cache.fetch('26568030').ikscd
-> 010

Link

Fix data

  1. delete the package
  2. re-entry the package

Check update_price_feeds

masa@masa ~/ywesee/oddb.org $ bin/admin
ch.oddb> Updater.new(self).update_price_feeds

Result

...
package.odba_id = 25002483
package.odba_id = 25002520
package.odba_id = 25002515
failsafe rescued NoMethodError < StandardError
undefined method `fr' for #<ODDB::Text::Chapter:0x7fa673ee4348>
/home/masa/ywesee/oddb.org/src/util/oddbapp.rb:1472:in `_admin'
(eval):2:in `send'
/home/masa/ywesee/oddb.org/src/view/drugs/package.rb:191:in `limitation_text'
/usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:85:in `send'
/usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:85:in `create'
/usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:322:in `compose_component'
/usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:239:in `compose'
/usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:232:in `each'
/usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:232:in `compose'
/usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:61:in `init'
/home/masa/ywesee/oddb.org/src/view/drugs/package.rb:141:in `init'
/usr/lib64/ruby/site_ruby/1.8/htmlgrid/component.rb:138:in `initialize'
/usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:70:in `new'
/usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:70:in `create'
/usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:322:in `compose_component'
/usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:239:in `compose'
/usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:232:in `each'
/usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:232:in `compose'
/usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:61:in `init'
/usr/lib64/ruby/site_ruby/1.8/htmlgrid/component.rb:138:in `initialize'
/home/masa/ywesee/oddb.org/src/view/rss/package.rb:60:in `new'
/home/masa/ywesee/oddb.org/src/view/rss/package.rb:60:in `to_html'
/home/masa/ywesee/oddb.org/src/view/rss/package.rb:39:in `each'
/home/masa/ywesee/oddb.org/src/view/rss/package.rb:39:in `to_html'
/usr/lib64/ruby/1.8/rss/maker/base.rb:169:in `make'
/usr/lib64/ruby/1.8/rss/maker/base.rb:137:in `make'
/usr/lib64/ruby/1.8/rss/maker.rb:11:in `make'
/home/masa/ywesee/oddb.org/src/view/rss/package.rb:29:in `to_html'
/home/masa/ywesee/oddb.org/src/plugin/plugin.rb:80:in `update_rss_feeds'
/home/masa/ywesee/oddb.org/src/plugin/plugin.rb:79:in `open'
/home/masa/ywesee/oddb.org/src/plugin/plugin.rb:79:in `update_rss_feeds'
/home/masa/ywesee/oddb.org/src/plugin/plugin.rb:46:in `call'
/home/masa/ywesee/oddb.org/src/plugin/plugin.rb:46:in `l10n_sessions'
/home/masa/ywesee/oddb.org/src/plugin/plugin.rb:43:in `each_key'
/home/masa/ywesee/oddb.org/src/plugin/plugin.rb:43:in `l10n_sessions'
/home/masa/ywesee/oddb.org/src/plugin/plugin.rb:74:in `update_rss_feeds'
/home/masa/ywesee/oddb.org/src/plugin/rss.rb:38:in `update_price_feeds'
/home/masa/ywesee/oddb.org/src/util/updater.rb:315:in `update_price_feeds'
(eval):1:in `_admin'
/home/masa/ywesee/oddb.org/src/util/failsafe.rb:9:in `call'
/home/masa/ywesee/oddb.org/src/util/failsafe.rb:9:in `failsafe'
/home/masa/ywesee/oddb.org/src/util/oddbapp.rb:1471:in `_admin'
/home/masa/ywesee/oddb.org/src/util/oddbapp.rb:1469:in `initialize'
/home/masa/ywesee/oddb.org/src/util/oddbapp.rb:1469:in `new'
/home/masa/ywesee/oddb.org/src/util/oddbapp.rb:1469:in `_admin'
/usr/lib64/ruby/1.8/drb/drb.rb:1555:in `__send__'
/usr/lib64/ruby/1.8/drb/drb.rb:1555:in `perform_without_block'
/usr/lib64/ruby/1.8/drb/drb.rb:1515:in `perform'
/usr/lib64/ruby/1.8/drb/drb.rb:1589:in `main_loop'
/usr/lib64/ruby/1.8/drb/drb.rb:1585:in `loop'
/usr/lib64/ruby/1.8/drb/drb.rb:1585:in `main_loop'
/usr/lib64/ruby/1.8/drb/drb.rb:1581:in `start'
/usr/lib64/ruby/1.8/drb/drb.rb:1581:in `main_loop'
/usr/lib64/ruby/1.8/drb/drb.rb:1430:in `run'
/usr/lib64/ruby/1.8/drb/drb.rb:1427:in `start'
/usr/lib64/ruby/1.8/drb/drb.rb:1427:in `run'
/usr/lib64/ruby/1.8/drb/drb.rb:1347:in `initialize'
/usr/lib64/ruby/1.8/drb/drb.rb:1627:in `new'
/usr/lib64/ruby/1.8/drb/drb.rb:1627:in `start_service'
bin/oddbd:38
ODDB::View::Drugs::PackageInnerComposite::COMPONENTS[[0, 11]] in create(limitation_text)
ODDB::View::Rss::PackageTemplate::COMPONENTS[[0, 0]] in create(ODDB::View::Drugs::PackageInnerComposite)

Check the package

ch.oddb> ODBA.cache.fetch('25002515')
-> #<ODDB::Package:0x7fa8286eb0e0>
ch.oddb> ODBA.cache.fetch('25002515').iksnr
-> 60594
ch.oddb> ODBA.cache.fetch('25002515').seqnr
-> 04
ch.oddb> ODBA.cache.fetch('25002515').ikscd
-> 004

Link

Check update_price_feeds again

masa@masa ~/ywesee/oddb.org $ bin/admin
ch.oddb> Updater.new(self).update_price_feeds

Result

package.odba_id = 25003528
package.odba_id = 25003523
failsafe rescued NoMethodError < StandardError
undefined method `fr' for #<ODDB::Text::Chapter:0x7fbfb26546a8>
/home/masa/ywesee/oddb.org/src/util/oddbapp.rb:1472:in `_admin'
(eval):2:in `send'
/home/masa/ywesee/oddb.org/src/view/drugs/package.rb:191:in `limitation_text
...

Check package

ch.oddb> ODBA.cache.fetch('25003523')
-> #<ODDB::Package:0x7fbfb370ce00>
ch.oddb> ODBA.cache.fetch('25003523').iksnr
-> 60610
ch.oddb> ODBA.cache.fetch('25003523').seqnr
-> 04
ch.oddb> ODBA.cache.fetch('25003523').ikscd
-> 004

Link

Fix the other packages as well

Links (updated packages)

Debug ODBA data corruption

Problem

  • Two update processes of the same database by using ODBA at the same time may cause data corruption

Experiment

Run

  • After update_odba1.rb running, quickly run the update_odba2.rb

Check the data

suspend

view · edit · sidebar · attach · print · history
Page last modified on April 04, 2012, at 08:59 AM