[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: direct local change when a consumer chains a write to the producer? (Was: openldap-server-2.2.29: multimaster support)

What about this:

- chain the modification to the producer, using the chainer's identity
asserting that of the client; this is already done by slapo-chain; plus:

	- add:
		- a postread for entryUUID,entryCSN,modifyTimestamp

	- modify/modrdn:
		- a preread for entryUUID,entryCSN
		- a postread for entryCSN,modifyTimestamp

	- delete:
		- a preread for entryUUID,entryCSN

In case of error, return it to the client and stop.

In case of success, based on the returned data, re-issue the
modification locally, using the replicator's identity, with:

	- add:
	- modify/modrdn/delete:
		- an assert over entryUUID and entryCSN,
		  that must match those returned by the preread

In case of assert failure, return success to the client.

In case of other local failure, I guess we should return success and
wait for replication to do its job.

This procedure ensures that:

1) the operation is correctly chained to the producer, to the extent it
would without any other intervention, because the chaining process is
not altered;

2) in case any violation occurs, it's always on the consumer side, so in
the worst case no direct write occurs and synchronization is delegated
to replication (it should be transparent to syncrepl; may need work, in
case of success, with slurpd, to avoid rejects).


Ing. Pierangelo Masarati
Responsabile Open Solution

SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
Office:   +39.02.23998309          
Mobile:   +39.333.4963172
Email:    pierangelo.masarati@sys-net.it