[PATCH] Schema replication
kamenim at samba.org
Sat Dec 11 19:04:37 MST 2010
On Sun, Dec 12, 2010 at 01:30, Andrew Bartlett <abartlet at samba.org> wrote:
> It seems to me that always using the remote server's prefixMap presumes
> that only remote servers can create prefixes. Given that an OID is a
> standard data type, and not restricted to the schema (and therefore the
> schema master), shouldn't it be the case that the creation of prefixes
> is inherently multi-master, and therefore we should handle it locally on
> each node?
You are totally right - OID is the standart data type. Prefix map id
(ATTID) is not. So we should map remote ATTID to a local ATTID using
remote prefix map.
Every DC has its own prefix map. And thats why DCs send their prefix
map along with replication data so that receiving DC can decode those
ATTIDs into numeric OID. (actually sending a prefix map used to encode
OID in the replica is more correct)
> Similarly, if two different schema masters (because of a migration)
> somehow come to have a different prefixMap, how will we handle that if
> we don't maintain our own local one?
We handle this by creating a prefix in our loca prefix map.
1. decode(remote-ATTID, remote-pfm) -> numeric-OID
2. encode(numeric-OID, local-pfm) -> ATTID
On step 2 we create new entry in our local prefix map, in case there
is no prefix for given OID.
Btw, MS does not require the partner DC to have a persistent prefix map.
Prefix map is required only during Replication cycle.
Samba Team http://samba.org
More information about the samba-technical