Emmanuel Lecharny wrote:
You can do a revert(int a) followed by a clear(int a) to bring the
server
back to state 'a' and remove any record of changes in the changelog.
Better do a clear(). Unless the clear() just remove info from the
changeLog. In my mind, clear = remove from server and changelog.
clear() is a method that we're considering putting into the ChangeLog
interface. So it will not remove anything from the DIT but should remove
change events from within the ChangeLog.
So let me sumarize :
- revert() will remove entries from the backend, but will add the
reverted operation into the changelog
the revert can be a 'add' operation also (just to add a point, not that you are
not aware of)
- clear() will remove everything from the changelog up to a specific rev
or tag, but don't remove anything from the server
That mean we need to do a revert() followed by a clear() to remove
entries from the backend and from the changelog, assuming that in this
case, we will have added reverted operation into the changeLog for nothing.
In this case, a revertAndClear() operation which removes entries from
the server and remove the associated reverted operations from the
changelog, in order to avoid this useless reverted operation creation
and storage. We can live with it, but as this is the second iteration on
ChangeLog, it may be time to give it a second thought.
have a question here, we are storing every change operation's revision number
in 'revisions' attribute of the entry
this clear() will definitely make this attribute's semantic or any other operations involving this attribute (e.x an
entry's entire version history) make it useless
I believe this clear operation can only be helpful in case of entries that no longer exist in DIT, but still we need
this info in CL, right?
Kiran Ayyagari