Hi,
I haev a quick question which I haven't been able to find an answer to in the docs:
I have a slapd master with a couple of slaves (syncrepl refreshAndPersist). I can get updates to be diverted to the master with the chain overlay, but as the FAQ says there'll be a small delay before the changes are replicated back to the slaves. Is there anyway to automatically direct subsequent reads of the changed attributes to the master?
Else I guess I'll have to implement referral chasing logic in the client so it doesn't try to read from the slave immediately after writing (and getting a referral).
regards, Peter
Peter Mogensen wrote:
Hi,
I haev a quick question which I haven't been able to find an answer to in the docs:
I have a slapd master with a couple of slaves (syncrepl refreshAndPersist). I can get updates to be diverted to the master with the chain overlay, but as the FAQ says there'll be a small delay before the changes are replicated back to the slaves. Is there anyway to automatically direct subsequent reads of the changed attributes to the master?
If you have access to the master why not just write to the master to begin with?
Else I guess I'll have to implement referral chasing logic in the client so it doesn't try to read from the slave immediately after writing (and getting a referral).
regards, Peter
Gavin Henry wrote:
If you have access to the master why not just write to the master to begin with?
Because it would make the clients and their configuration a fair bit more complex. I'd rather not know the identity of the master server in the client code if I could avoid it.
Peter
Peter Mogensen wrote:
I haev a quick question which I haven't been able to find an answer to in the docs:
I have a slapd master with a couple of slaves (syncrepl refreshAndPersist). I can get updates to be diverted to the master with the chain overlay, but as the FAQ says there'll be a small delay before the changes are replicated back to the slaves. Is there anyway to automatically direct subsequent reads of the changed attributes to the master?
Yes, there is: add the "don't use copy" control to the read request. If your client has write, then read requirements, using the chain overlay to avoid dealing with referrals is definitely a bad idea.
p.
Ing. Pierangelo Masarati OpenLDAP Core Team
SysNet s.r.l. via Dossi, 8 - 27100 Pavia - ITALIA http://www.sys-net.it --------------------------------------- Office: +39 02 23998309 Mobile: +39 333 4963172 Email: pierangelo.masarati@sys-net.it ---------------------------------------
Pierangelo Masarati wrote:
Yes, there is: add the "don't use copy" control to the read request. If your client has write, then read requirements, using the chain overlay to avoid dealing with referrals is definitely a bad idea.
Ah... "don't use copy" is slapd 2.4. I forgot to say I'm on 2.3 - for now. Anyway... I thought that was the whole point of slapo-chain - to get automatic referral chasing.
regards, Peter
Peter Mogensen wrote:
Pierangelo Masarati wrote:
Yes, there is: add the "don't use copy" control to the read request. If your client has write, then read requirements, using the chain overlay to avoid dealing with referrals is definitely a bad idea.
Ah... "don't use copy" is slapd 2.4. I forgot to say I'm on 2.3 - for now. Anyway... I thought that was the whole point of slapo-chain - to get automatic referral chasing.
It is. But if a client knows it's doing something weird (like write, then read, potentially to a consumer) then it needs to take precautions, like don't use copy. In that case, the consumer would return a referral, and slapo-chain would chase it transparently.
p.
Ing. Pierangelo Masarati OpenLDAP Core Team
SysNet s.r.l. via Dossi, 8 - 27100 Pavia - ITALIA http://www.sys-net.it --------------------------------------- Office: +39 02 23998309 Mobile: +39 333 4963172 Email: pierangelo.masarati@sys-net.it ---------------------------------------
Pierangelo Masarati wrote:
Peter Mogensen wrote:
Ah... "don't use copy" is slapd 2.4. I forgot to say I'm on 2.3 - for now. Anyway... I thought that was the whole point of slapo-chain - to get automatic referral chasing.
It is. But if a client knows it's doing something weird (like write, then read, potentially to a consumer) then it needs to take precautions, like don't use copy. In that case, the consumer would return a referral, and slapo-chain would chase it transparently.
ah... Fair enough. I see what you meant now. That would also be ok. A lot better for me than handling database connections to the master. Unfortunately that seems to imply a move to slapd 2.4.
Thanks for the input.
Peter
openldap-software@openldap.org