[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cifs-protocol
Subject:    Re: [cifs-protocol] Replicating deleted object procedure
From:       Obaid Farooqi <obaidf () microsoft ! com>
Date:       2010-05-18 15:16:12
Message-ID: C76EE6B9CA401246BD8228089E50BC023A33C0F1 () TK5EX14MBXC121 ! redmond ! corp ! microsoft ! com
[Download RAW message or body]

[Attachment #2 (text/plain)]

Hi Kamen:
Thank you for contacting Microsoft regarding your question on deleted objects. A \
member of protocol documentation team will be in touch soon.

Regards,
Obaid Farooqi
Sr. Support Escalation Engineer | Microsoft

From: kamenim@gmail.com [mailto:kamenim@gmail.com] On Behalf Of Kamen Mazdrashki
Sent: Tuesday, May 18, 2010 7:33 AM
To: Interoperability Documentation Help; cifs-protocol@samba.org; pfif@tridgell.net
Subject: Replicating deleted object procedure clarifications

Dear Dochelp,

I am currently trying to refactor Delete object implementation in Samba and I need \
some help with algorithm used for deleting objects and how the deletion is replicated \
to other DCs.

Reference:
 ProcessGetNCChangesReply [MS-DRSR] - \
http://msdn.microsoft.com/en-us/library/dd207758(v=PROT.13).aspx  UpdateObject \
[MS-DRSR] - http://msdn.microsoft.com/en-us/library/dd207780(v=PROT.13).aspx  Delete \
Operation [MS-ADTS] - \
http://msdn.microsoft.com/en-us/library/cc223480(v=PROT.13).aspx

Consider following sutiation:
0. We have two DCs configuration.
    We have an OU object with following props:
      dn: OU=TEST_DELETE_0417,DC=samba,DC=devel
      objectGUID: b7f1b90d-d247-45b7-87fb-f6bc916bd729

1. We delete this OU on DC1. The state of this object on each dc should be as \
follows:  DC1:
      dn: OU=TEST_DELETE_0417\0ADEL:b7f1b90d-d247-45b7-87fb-f6bc916bd729,CN=Deleted \
Objects,DC=samba,DC=devel  objectGUID: b7f1b90d-d247-45b7-87fb-f6bc916bd729
      isDeleted: TRUE
      isRecycled: TRUE
  DC2:
      dn: OU=TEST_DELETE_0417,DC=samba,DC=devel
      objectGUID: b7f1b90d-d247-45b7-87fb-f6bc916bd729

2. Replication is triggered from DC1 to DC2.
Now, according to UpdateObject() procedure, we will identify that Object's DN has \
changed from "dn: OU=TEST_DELETE_0417,DC=samba,DC=devel"
to "dn: OU=TEST_DELETE_0417\0ADEL:b7f1b90d-d247-45b7-87fb-f6bc916bd729,CN=Deleted \
Objects,DC=samba,DC=devel". Hence we will modify object's DN (calling \
PerformModifyDNOperation() operation). Which will make this object a Deleted-object \
right? While progressing further in UpdateObject() procedure, we will check and see, \
that 'isDeleted' attribute value is TRUE, so we shall call RemoveObj() procedure. At \
this point I am a little bit puzzled as there are two possible outcomes from this \
procedure: 1. Object's RDN should be transformed to a delete-mangled RDN. So we \
should end with an RDN like:  \
TEST_DELETE_0417\0ADEL:b7f1b90d-d247-45b7-87fb-f6bc916bd72\0ADEL:b7f1b90d-d247-45b7-87fb-f6bc916bd72 \
right? 2. Or, as the object is already under "Deleted Object" container (moved there \
by previous call to PerformModifyOperation()), RemoveObj() procedure should delete it \
further - i.e. if the object is a Tombstone, it will be completely removed.


Sorry that my description gets so messy.
Basically what UpdateObject() states is that first we should execute \
PerformModifyOperation() and then RemoveObj(). Which is a little bit confusing, as \
PerformModifyOperation() will turn the object into a Deleted-object. Calling \
RemoveObj() later will actually act on already modified object, so I wonder - how \
does RemoveObj() knows that we just converted the object and this object should not \
be completely removed?

Another possibility is for PeformModifyOperation() to determine that target DN will \
move the object under "Deleted Objects" container, and in this case to modify only \
Attribute values on the object, but not to call PerformModifyDNOperation() operation?

--
CU,
Kamen Mazdrashki
kamen.mazdrashki@postpath.com<mailto:kamen.mazdrashki@postpath.com>
http://gitweb.samba.org/?p=kamenim/samba.git;a=summary
-------------------------------------
CISCO SYSTEMS BULGARIA EOOD
http://www.cisco.com/global/BG/


[Attachment #3 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type \
content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 \
(filtered medium)"><style><!-- /* Font Definitions */
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-reply;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri","sans-serif";}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div \
class=WordSection1><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi \
Kamen:<o:p></o:p></span></p><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thank you \
for contacting Microsoft regarding your question on deleted objects. A member of \
protocol documentation team will be in touch soon.<o:p></o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Regards,<o:p></o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Obaid \
Farooqi<o:p></o:p></span></p><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Sr. Support \
Escalation Engineer | Microsoft<o:p></o:p></span></p><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><b><span \
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span \
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> kamenim@gmail.com \
[mailto:kamenim@gmail.com] <b>On Behalf Of </b>Kamen Mazdrashki<br><b>Sent:</b> \
Tuesday, May 18, 2010 7:33 AM<br><b>To:</b> Interoperability Documentation Help; \
cifs-protocol@samba.org; pfif@tridgell.net<br><b>Subject:</b> Replicating deleted \
object procedure clarifications<o:p></o:p></span></p><p \
class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Dear \
Dochelp,<o:p></o:p></p><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p \
class=MsoNormal>I am currently trying to refactor Delete object implementation in \
Samba and I need some help<o:p></o:p></p></div><div><p class=MsoNormal>with algorithm \
used for deleting objects and how the deletion is replicated to other \
DCs.<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p \
class=MsoNormal>Reference:<o:p></o:p></p></div><div><p \
class=MsoNormal>&nbsp;ProcessGetNCChangesReply [MS-DRSR] -&nbsp;<a \
href="http://msdn.microsoft.com/en-us/library/dd207758(v=PROT.13).aspx" \
target="_blank">http://msdn.microsoft.com/en-us/library/dd207758(v=PROT.13).aspx</a><o:p></o:p></p></div><div><p \
class=MsoNormal>&nbsp;&nbsp; &nbsp;UpdateObject [MS-DRSR] -&nbsp;<a \
href="http://msdn.microsoft.com/en-us/library/dd207780(v=PROT.13).aspx" \
target="_blank">http://msdn.microsoft.com/en-us/library/dd207780(v=PROT.13).aspx</a><o:p></o:p></p></div><div><p \
class=MsoNormal>&nbsp;Delete Operation [MS-ADTS] -&nbsp;<a \
href="http://msdn.microsoft.com/en-us/library/cc223480(v=PROT.13).aspx" \
target="_blank">http://msdn.microsoft.com/en-us/library/cc223480(v=PROT.13).aspx</a><o:p></o:p></p></div><div><p \
class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>Consider following \
sutiation:<o:p></o:p></p></div><div><p class=MsoNormal>0. We have two DCs \
configuration.<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;&nbsp; &nbsp;We have \
an OU object with following props:<o:p></o:p></p></div><div><p \
class=MsoNormal>&nbsp;&nbsp; &nbsp; &nbsp;dn: \
OU=TEST_DELETE_0417,DC=samba,DC=devel<o:p></o:p></p></div><div><p \
class=MsoNormal>&nbsp;&nbsp; &nbsp; &nbsp;objectGUID: \
b7f1b90d-d247-45b7-87fb-f6bc916bd729<o:p></o:p></p></div><div><p \
class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>1. We delete this \
OU on DC1. The state of this object on each dc should be as \
follows:<o:p></o:p></p></div><div><p \
class=MsoNormal>&nbsp;&nbsp;DC1:<o:p></o:p></p></div><div><p \
class=MsoNormal>&nbsp;&nbsp; &nbsp; &nbsp;dn: \
OU=TEST_DELETE_0417\0ADEL:b7f1b90d-d247-45b7-87fb-f6bc916bd729,CN=Deleted \
Objects,DC=samba,DC=devel<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;&nbsp; \
&nbsp; &nbsp;objectGUID: \
b7f1b90d-d247-45b7-87fb-f6bc916bd729<o:p></o:p></p></div><div><p \
class=MsoNormal>&nbsp;&nbsp; &nbsp; &nbsp;isDeleted: TRUE<o:p></o:p></p></div><div><p \
class=MsoNormal>&nbsp;&nbsp; &nbsp; &nbsp;isRecycled: \
TRUE<o:p></o:p></p></div><div><p \
class=MsoNormal>&nbsp;&nbsp;DC2:<o:p></o:p></p></div><div><p \
class=MsoNormal>&nbsp;&nbsp; &nbsp; &nbsp;dn: \
OU=TEST_DELETE_0417,DC=samba,DC=devel<o:p></o:p></p></div><div><p \
class=MsoNormal>&nbsp;&nbsp; &nbsp; &nbsp;objectGUID: \
b7f1b90d-d247-45b7-87fb-f6bc916bd729<o:p></o:p></p></div><div><p \
class=MsoNormal>&nbsp;&nbsp; &nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>2. \
Replication is triggered from DC1 to DC2.<o:p></o:p></p></div><div><p \
class=MsoNormal>Now, according to UpdateObject() procedure, we will identify that \
Object's DN has changed from&nbsp;<o:p></o:p></p></div><div><p \
class=MsoNormal>&quot;dn: \
OU=TEST_DELETE_0417,DC=samba,DC=devel&quot;&nbsp;<o:p></o:p></p></div><div><p \
class=MsoNormal>to &quot;dn: \
OU=TEST_DELETE_0417\0ADEL:b7f1b90d-d247-45b7-87fb-f6bc916bd729,CN=Deleted \
Objects,DC=samba,DC=devel&quot;.<o:p></o:p></p></div><div><p class=MsoNormal>Hence we \
will modify object's DN (calling&nbsp;PerformModifyDNOperation() \
operation).<o:p></o:p></p></div><div><p class=MsoNormal>Which will make this object a \
Deleted-object right?<o:p></o:p></p></div><div><p class=MsoNormal>While progressing \
further in UpdateObject() procedure, we will check and see, that \
'isDeleted'<o:p></o:p></p></div><div><p class=MsoNormal>attribute value is TRUE, so \
we shall call RemoveObj() procedure. At this point I am a little bit puzzled \
as&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>there are two possible outcomes \
from this procedure:<o:p></o:p></p></div><div><p class=MsoNormal>1. Object's RDN \
should be transformed to a delete-mangled RDN. So we should end with an RDN \
like:<o:p></o:p></p></div><div><p \
class=MsoNormal>&nbsp;TEST_DELETE_0417\0ADEL:b7f1b90d-d247-45b7-87fb-f6bc916bd72\0ADEL:b7f1b90d-d247-45b7-87fb-f6bc916bd72 \
right?&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>2. Or, as the object is \
already under &quot;Deleted Object&quot; container (moved there by previous call to \
PerformModifyOperation()),<o:p></o:p></p></div><div><p class=MsoNormal>RemoveObj() \
procedure should delete it further - i.e. if the object is a Tombstone, it will be \
completely removed.<o:p></o:p></p></div><div><p \
class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p \
class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>Sorry that my \
description gets so messy.<o:p></o:p></p></div><div><p class=MsoNormal>Basically what \
UpdateObject() states is that first we should execute PerformModifyOperation() and \
then RemoveObj().<o:p></o:p></p></div><div><p class=MsoNormal>Which is a little bit \
confusing, as PerformModifyOperation() will turn the object into a \
Deleted-object.<o:p></o:p></p></div><div><p class=MsoNormal>Calling RemoveObj() later \
will actually act on already modified object, so I wonder - how does \
RemoveObj()<o:p></o:p></p></div><div><p class=MsoNormal>knows that we just converted \
the object and this object should not be completely \
removed?<o:p></o:p></p></div><div><p \
class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>Another \
possibility is for PeformModifyOperation() to determine that target DN will move the \
object under&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>&quot;Deleted \
Objects&quot; container, and in this case to modify only Attribute values on the \
object, but not to call<o:p></o:p></p></div><div><p \
class=MsoNormal>PerformModifyDNOperation() operation?<o:p></o:p></p></div><div><p \
class=MsoNormal><br>-- <br>CU,<br>Kamen Mazdrashki<br><a \
href="mailto:kamen.mazdrashki@postpath.com" \
target="_blank">kamen.mazdrashki@postpath.com</a><br><a \
href="http://gitweb.samba.org/?p=kamenim/samba.git;a=summary" \
target="_blank">http://gitweb.samba.org/?p=kamenim/samba.git;a=summary</a><br>-------------------------------------<br>CISCO \
SYSTEMS BULGARIA EOOD<br><a href="http://www.cisco.com/global/BG/" \
target="_blank">http://www.cisco.com/global/BG/</a><o:p></o:p></p></div></div></body></html>




_______________________________________________
cifs-protocol mailing list
cifs-protocol@cifs.org
https://lists.samba.org/mailman/listinfo/cifs-protocol

--===============5468302741823803133==--

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic