<< | Index | >>
Problem
ODBA::Stub was unable to replace Hash#27577207 from ODDB::Fachinfo:#1418110 ODBA::Stub was unable to replace Hash#27577524 from ODDB::Patinfo:#1151 ODBA::Stub was unable to replace Hash#27577812 from ODDB::Fachinfo:#1861266 ODBA::Stub was unable to replace Hash#27578095 from ODDB::AddressSuggestion:#881704 ...
Note
Experiment
ch.oddb> ODBA.cache.fetch('27577207') -> {} ch.oddb> ODBA.cache.fetch('1418110') -> #<ODDB::FachinfoDocument2001:0x000000048a5cb0> ch.oddb> odba_container = ODBA.cache.fetch('1418110'); ODBA.cache.fetch('27577207', odba_container) -> {}
Note
Experiment
masa@masa ~/ywesee/oddb.org.ruby193 $ psql -U postgres oddb.org psql (8.4.2) Geben Sie »help« für Hilfe ein. oddb.org=# SELECT content FROM object WHERE odba_id = 27577207; content --------- (0 Zeilen) oddb.org=# SELECT content FROM object WHERE odba_id = 1418110; (data is shown)
Note
def load_object(odba_id, odba_caller)
start = Time.now if(@debug)
dump = ODBA.storage.restore(odba_id)
def odba_replace_persistables # :nodoc:
...
odba_serializables.each { |name|
var = instance_variable_get(name)
if(var.is_a?(ODBA::Stub))
instance_variable_set(name, var.odba_instance)
end
}
end
Check the number of objects (max odba_id) before migrate_to_utf8 runs
ch.oddb> ODBA.storage.max_id -> 27577023
Experiment
def odba_replace_persistables # :nodoc:
...
odba_serializables.each { |name|
var = instance_variable_get(name)
if(var.is_a?(ODBA::Stub))
#instance_variable_set(name, var.odba_instance)
instance_variable_set(name, var)
end
}
end
def _migrate_child_to_utf8 child, queue, table, iconv, opts={}
when ODBA::Persistable, ODBA::Stub
if child = child.odba_instance
if child.odba_unsaved?
_migrate_to_utf8 [child], table, iconv, opts
elsif opts[:all]
#odba_id = child.odba_id
if odba_id = child.instance_variable_get('@odba_id')
Note
Setup
$ sudo -u postgres dropdb oddb.org; sudo -u postgres createdb -E UTF8 -T template0 oddb.org $ zcat ../oddb.org/data/sql/oddb.org.20111102.sql.gz | psql -U postgres oddb.org
Run
$ ruby193 -I ../oddb/lib bin/oddbd > log.dat 2>&1
ch.oddb> migrate_to_utf8
Result