view · edit · sidebar · attach · print · history

20120127-update-TextInfoPlugin-

<< Masa.20120130-update_company_textinfos2-oddb_org | Index | Masa.20120126-update-TextInfoPlugin >>


  1. | Update TextInfoPlugin for new FI PI

Commits
  1. Ready ext/fiparsed for new fachinfo html document format (oddb.org)
  2. Implemented update_company_textinfo2 (oddb.org)
  3. Made ODDB.config.text_info_searchform2 (oddb.org)

Update TextInfoPlugin for new FI PI

Commits

Note

  • It seems that ODBA::Stub warning comes only the first time when fachinfo data is updated on Ruby 1.9.3

Error (update_company_infotext)

 ["/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.0.8/lib/odba/stub.rb:58:in `rescue in odba_receiver'",
 "/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.0.8/lib/odba/stub.rb:47:in `odba_receiver'",
 "/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.0.8/lib/odba/stub.rb:20:in `eql?'",
 "/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.0.8/lib/odba/persistable.rb:494:in `block in odba_cut_connection'",
 "/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.0.8/lib/odba/persistable.rb:494:in `delete_if'",
 "/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.0.8/lib/odba/persistable.rb:494:in `odba_cut_connection'",
 "/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.0.8/lib/odba/cache.rb:171:in `block in delete'",
 "/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.0.8/lib/odba/cache.rb:166:in `each'",
 "/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.0.8/lib/odba/cache.rb:166:in `delete'",
 "/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.0.8/lib/odba/persistable.rb:222:in `odba_delete'",
 "/home/masa/ywesee/oddb.org/src/util/persistence.rb:213:in `issue_delete'",
 "/home/masa/ywesee/oddb.org/src/util/oddbapp.rb:113:in `block in delete'",
 "/home/masa/ywesee/oddb.org/src/util/failsafe.rb:10:in `call'",
 "/home/masa/ywesee/oddb.org/src/util/failsafe.rb:10:in `failsafe'",
 "/home/masa/ywesee/oddb.org/src/util/oddbapp.rb:109:in `delete'",
 "/home/masa/ywesee/oddb.org/src/command/delete.rb:11:in `execute'",
 "/home/masa/ywesee/oddb.org/src/util/oddbapp.rb:614:in `execute_command'",
 "/home/masa/ywesee/oddb.org/src/util/oddbapp.rb:1416:in `delete'",
 "/home/masa/ywesee/oddb.org/src/plugin/text_info.rb:429:in `replace'",
 "/home/masa/ywesee/oddb.org/src/plugin/text_info.rb:571:in `block in update_product'",
 "/home/masa/ywesee/oddb.org/src/plugin/text_info.rb:564:in `each'",
 "/home/masa/ywesee/oddb.org/src/plugin/text_info.rb:564:in `update_product'",
 "(eval):1:in `block (2 levels) in _admin'",
 "/home/masa/ywesee/oddb.org/src/util/oddbapp.rb:1489:in `instance_eval'",
 "/home/masa/ywesee/oddb.org/src/util/oddbapp.rb:1489:in `block (2 levels) in _admin'",
 "/home/masa/ywesee/oddb.org/src/util/failsafe.rb:10:in `call'",
 "/home/masa/ywesee/oddb.org/src/util/failsafe.rb:10:in `failsafe'",
 "/home/masa/ywesee/oddb.org/src/util/oddbapp.rb:1488:in `block in _admin'"]
 ODBA::Stub was unable to replace #27689434 from Array:#28248681

Note

  • The warning comes when the old object is deleted

Experiment (bin/admin)

ch.oddb> ODBA.cache.fetch('28248681').odba_cut_connection(ODBA.cache.fetch('23785199'))
ODBA::Stub was unable to replace #27689434 from Array:#28248681
["/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.0.8/lib/odba/stub.rb:58:in `rescue in odba_receiver'",
 "/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.0.8/lib/odba/stub.rb:47:in `odba_receiver'",
 "/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.0.8/lib/odba/stub.rb:20:in `eql?'",
 "/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.0.8/lib/odba/persistable.rb:494:in `block in odba_cut_connection'",
 "/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.0.8/lib/odba/persistable.rb:494:in `delete_if'",
 "/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.0.8/lib/odba/persistable.rb:494:in `odba_cut_connection'",
 "(eval):1:in `block (2 levels) in _admin'",
 "/home/masa/ywesee/oddb.org/src/util/oddbapp.rb:1494:in `instance_eval'",
 "/home/masa/ywesee/oddb.org/src/util/oddbapp.rb:1494:in `block (2 levels) in _admin'",
 "/home/masa/ywesee/oddb.org/src/util/failsafe.rb:10:in `call'",
 "/home/masa/ywesee/oddb.org/src/util/failsafe.rb:10:in `failsafe'",
 "/home/masa/ywesee/oddb.org/src/util/oddbapp.rb:1493:in `block in _admin'"]

Experiment

ch.oddb> ODBA.cache.fetch('28248681')[136].inspect
-> #<ODBA::Stub:57568160#27689434 @odba_class= @odba_container=67188200#28248681>

ch.oddb> ODBA.cache.fetch('28248681')[136].class
-> NilClass

ch.oddb> ODBA.cache.fetch('28248681').length
-> 3091
ch.oddb> ODBA.cache.fetch('28248681').delete_at(136)
-> 
ch.oddb> ODBA.cache.fetch('28248681').length
-> 3091

Note

  • The object, 28248681, is returned from ODBA.storage.retrieve_connected_object('23785199')
  • The object, 23785199, is a Fachinfo object.
  • The ODBA.storage.retrieve_connected_object is called ODBA::Cache::delete method
  • The object, 28248681, is an Array (ODBA::Persistable), and the elements are instances of ODBA::Stub which links to ODDB::Fachinfo objects (ODBA::Persistable).
  • Some Stub::odba_id does not exist in the database, so Stub#odba_instance failed.
  • And the Stub element of Array, 28248681, remains, moreover it is impossible to delete the Stub element from bin/admin via ODBA.cache object.
  • It is possible to delete the Fachinfo object, 23785199.
Temporary summary
  • We leave it for the moment
  • ODBA::Stub warning comes but a process is skipped for the error Stub object
view · edit · sidebar · attach · print · history
Page last modified on January 27, 2012, at 05:30 PM