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

Re: When to delete client content during RFC4533 synchronization?

Erik van Oosten wrote:

I am writing a RFC4533 client implementation based on JLDAP. I have a
question on how to interpret the rfc as a client, and secondly how the
OpenLDAP server interprets it.

My question is: how can the client determine that it must delete content
at the end of the refresh stage, when a refreshAndPersist is requested
with an initial cookie?

The problem is that I can not defer from the rfc how I can differentiate
between a server that sends an initial content poll and a server that
sends a content update poll. The RFC specifies that the server may choose
to ignore the initial cookie and the reloadHint flag, so either poll mode
may be choosen by the server.

Your use of the words "client" and "server" seem inconsistent here. The above questions made no sense to me. Servers don't send polls.

In the case of a refreshOnly the RFC is clear: when refreshDeletes of
syncDoneValue is FALSE, content that is not added, changed, or indicated
as present must be deleted from the client copy (section 1.3.1 paragraph
However, in the case of a refreshAndPersist, there is no similar flag in
the SyncInfoMessage that ends the refresh stage. SyncInfoMessage does have
values named refreshDelete and refreshDeletes, but these are used for
other purposes (see section 3.4.1 and section 3.3.2 paragraph 7 and 9).

Am I missing something?

If the server used a present phase, then it will send a SyncInfoMessage with refreshPresent. If it used a delete phase, it will send a SyncInfoMessage with refreshDelete. If the refresh is stage is complete, the message will have refreshDone set to TRUE.

If the client receives a SyncInfoMessage with refreshPresent and refreshDone set to TRUE that means there's only a present phase and no delete phase. Therefore, any entry that wasn't marked present or added must be deleted.

What is the behavior of the OpenLDAP server in this matter? Does it ever
ignore the reloadHint of the sync request control?

In OpenLDAP 2.2 and early versions of 2.3 it always ignored the hint. In current versions you can configure it to use the hint.

Regards, Erik.

-- Erik van Oosten http://2008.rubyenrails.nl/ http://www.day-to-day-stuff.blogspot.com/

  -- Howard Chu
  Chief Architect, Symas Corp.  http://www.symas.com
  Director, Highland Sun        http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP     http://www.openldap.org/project/