jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig <mdue...@apache.org>
Subject Re: oak-api and move operations
Date Fri, 30 Mar 2012 12:05:48 GMT


On 30.3.12 12:48, Jukka Zitting wrote:
> Hi,
>
> On Thu, Mar 29, 2012 at 11:25 PM, Michael Dürig<michid@gmail.com>  wrote:
>> While this is not a problem for the user of the API, I think it is
>> problematic for the implementer: AFAIKT there is no way to
>> reliably recover move and copy operations just by comparing
>> raw trees (*).
>
> Git does this quite successfully. Is there some reason why we couldn't
> use a similar algorithm?

I don't know about the details of the algorithm Git uses. But *if* that 
algorithm *does* reconstruct move and copy operations from looking at 
the raw trees, I'm pretty sure they annotated the trees in some ways to 
track that information.

However, that doesn't solve the issue at hand. If we go down that route, 
why should we bother at all and reconstruct the operations from the 
state only to construct a JSOP statement to be given to 
Microkernel.commit()? We should rather do away with this entirely and 
pass the new tree directly to the Microkernel.

>
> More generally, what's the use case where this functionality is
> needed? I'd be happy to even drop support for NODE_MOVED observation
> events unless we have real clients that actually require that
> information (as opposed to just create/update/delete events).

I'd be fine with that. However, if clustering relies on journal 
scrapping, this is not an option.


Michael

>
> BR,
>
> Jukka Zitting

Mime
View raw message