Leslie P. Polzer wrote:
[snip]
- I didn't get what *txn-state* is for. All that it does is
doubling 'known-object-id' / 'set-known-object' functions.
*txn-state* holds the transaction-specific state. The old model only has transaction states via a system-global variable that gets reset before every transaction. This new code moves this state to *txn-state* and uses the system-global variable as a true global state that does not get reset.
Does that make things clear?
No :) The only purpose of 'state' in serialization is to maintain the objects table already serialized, so we can reference them instead of full persistence procedure. The old cl-prevalence implementation keeps that state only during one 'transaction', so the following transactions need to deeply serialize objects, that were already been serialized during previous transactions. My purpose to maintain that objects table until full snapshot is occurred.
I don't see what *txn-state* is for. It only copies the old state behavior.
[snip]
Please check my latest 20090926 cumulative patch where I only
removed serialization state clearing on each transaction. There are some tests included.
I don't think this will suffice. Can your code handle cycles in the object graph?
Sure, no problems here. The references to the already known objects are not serialized.
Check test/test-complex-serialize.lisp in my recent cl-prevalence-3.patch, there are tests for complex objects structure with cycles and several indexes.
Leslie