zodb / relstorage

A backend for ZODB that stores pickles in a relational database.
Other
54 stars 46 forks source link

fix batcher factory in OracleObjectMover initialization #380

Closed mamico closed 4 years ago

mamico commented 4 years ago

with Relstorage 3.0b2 and above Oracle support is broken with this error

  File ".../eggs/RelStorage-3.0.0-py3.7-linux-x86_64.egg/relstorage/storage/util.py", line 171, in state
    return method(storage._tpc_phase, *args, **kwargs)
  File ".../eggs/RelStorage-3.0.0-py3.7-linux-x86_64.egg/relstorage/storage/store.py", line 56, in restore
    tpc_phase.restore(oid, serial, data, prev_txn, transaction)
  File ".../eggs/RelStorage-3.0.0-py3.7-linux-x86_64.egg/relstorage/storage/tpc/restore.py", line 130, in restore
    cursor, self.batcher, oid_int, tid_int, data)
  File "src/perfmetrics/metric.py", line 66, in perfmetrics._metric._AbstractMetricImpl.__call__
  File ".../eggs/RelStorage-3.0.0-py3.7-linux-x86_64.egg/relstorage/adapters/oracle/mover.py", line 114, in restore
    batcher.add_array_op(
AttributeError: 'RowBatcher' object has no attribute 'add_array_op'

It seems that the new OracleObjectMover __init__ doesn't initialize correctly with the specific row batcher_factory.

jamadden commented 4 years ago

Mmm. True. That would be the fault of https://github.com/zodb/relstorage/commit/00d6bbfc3402270f979a59c9b918e393b65bb5d7. I clearly failed to fully verify Oracle after that. Thank you!

mamico commented 4 years ago

@jamadden awesome if you release 3.0.1 with Oracle support fixed. thanks.