[Date Prev][Date Next]
Re: direct local change when a consumer chains a write to the producer? (Was: openldap-server-2.2.29: multimaster support)
- To: Pierangelo Masarati <firstname.lastname@example.org>
- Subject: Re: direct local change when a consumer chains a write to the producer? (Was: openldap-server-2.2.29: multimaster support)
- From: "Kurt D. Zeilenga" <Kurt@OpenLDAP.org>
- Date: Tue, 22 Nov 2005 07:34:22 -0800
- Cc: OpenLDAP devel list <openldap-devel@OpenLDAP.org>
- In-reply-to: <1132657431.3354.61.camel@ando>
- References: <email@example.com> <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org> <email@example.com> <20498EEB4C91E6CD7543390E@cadabra-dsl.stanford.edu> <firstname.lastname@example.org> <0F84CCF877D1F094219160DC@cadabra-dsl.stanford.edu> <1132493739.3316.112.camel@ando> <F5A02675FC28DA7864C3438C@cadabra-dsl.stanford.edu> <1132505214.3316.117.camel@ando> <email@example.com> <firstname.lastname@example.org> <email@example.com> <1132590414.3330.4.camel@ando> <firstname.lastname@example.org> <email@example.com> <1132592221.3330.14.camel@ando> <1132594689.6044.6.camel@ando> <firstname.lastname@example.org> <1132657431.3354.61.camel@ando>
At 03:03 AM 11/22/2005, Pierangelo Masarati wrote:
>On Mon, 2005-11-21 at 11:13 -0800, Kurt D. Zeilenga wrote:
>> In theory, the slave could attach a post-readEntry control to
>> chaining operation wrapping the the modify request and use
>> the returned entry to "pre-sync" the value.
>We'd need a pre-read to fetch the pre-modify current CSN and entryUUID,
>in order to understand if the modification can be directly applied to
>the local database,
Don't 'apply the modify', instead "sync to the result of the modify".
Hence, only post-read is needed.
>and a post-read to fetch the newly assigned CSN and
>modifyTimestamp (and entryUUID, in case of add), to build up the local
>modification (we already know the modifiersName).
You do not necessarily know the name the master will
use as the modifier.
>> Of course,
>> syncrepl would then need to ignore changes to that
>> entry that have an later CSN.
If you sync to the result, the slave can ignore pre-existing CSNs.
>I think this implicit in syncrepl, because as soon as this independent
>operation syncs the CSN, syncrepl should understand it doesn't need to
>process it futher. Although I didn't consider the issue deep enough
>yet, there shouldn't be any chance of an intermixing modification, since
>we are performing it only if the CSN of the original and of the shadow
>copy were the same, and we get the new CSN after the modification
>directly from the producer, so there cannot be any change in between.
>The only issue I see is if (but, how?) another change gets to the
>producer right after, and sync takes place before the local modification
>is performed. But this wouldn't yet be an issue, because if the local
>modification fails, eventually syncrepl will line-up the shadow entry,
>so we plainly need to ignore failures in the local modification.
>> Note that use with a chaining operation is necessary here
>> for two reasons:
>> 1) to avoid conflict with any client provided read
>> entry control, and
>> 2) appropriate authorization (e.g., as slave not
>Well, the modification should be chained to the consumer as the client,
>so that appropriate access control takes place; the local modification
>should be performed as the replicator identity. So I agree with point
>(1), but not with point (2),
The problem is that the read control will be process as the
client's id, not the slave's id. The read control must be processed
as the slave's id as the client id might not be authorized to
read what the slave needs. By placing the read control in
the outer chaining operation, the read is requested under the
If you don't use a chaining operation, you need to do separately
read the results.
>because if the consumer is a shadow of the
>producer, we should be able to assume that whoever should be able to
>write to the consumer should also be able to write to the producer. Of
>course, we might not be able to rebind as the client (unless simple bind
>was used), so we'd rather need to assert its identity (I guess this is
>part of the devil you mentioned :). In any case the operation needs to
>What's the status of operation chaining? Where should I start looking
The I-D might presently be expired, but that doesn't mean you
shouldn't start looking at it. We need to push this stuff
forward through "early", "experimental" implemention.
>Ing. Pierangelo Masarati
>Responsabile Open Solution
>Via Dossi, 8 - 27100 Pavia - ITALIA