Skip to content

Client_Side_Conflict_Resolution

Jim Fulton edited this page Apr 28, 2016 · 1 revision

Client-side conflict resolution

I (Jim) had hoped to do something more ambitious with ZODB-level conflict resolution, but having gotten into it, I realized that it would require more thought.

This proposal is an interim proposal/sketch aimed at getting more or less existing conflict resolution off of the ZEO server and on to the client.

  • New ZEO protocol, to reflect change in behavior of vote.

    Ideally, this would also drop load and full-validation.

  • Add option to FileStorage to disable conflict resolution, or

    in the short term ZEO monkey-patches tryToResolveConflict to always raise.

  • Vote catches conflict errors, collects conflicts and returns them as:

    { oid -> {committed_serial, old_serial, new_data, committed_data}}
    

    Lock is released and the transaction is still valid.

  • The client tries to resolve the conflicts. If it can, it issues new store calls. The serial in these store calls is the committed tid, since that is the basis for the new values.

    If conflict-resolution fails, then the client will abort the transaction.

  • The commit log on the server can have multiple entries for an oid. If a conflict is found, it may be resolved by later entries in the commit log.

Clone this wiki locally