jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davide Giannella <giannella.dav...@gmail.com>
Subject Re: Avoiding conflicts (OAK-1717)
Date Tue, 29 Apr 2014 12:53:55 GMT
Thank you all for the support and feedbacks.

In the aim of find a structure that avoid conflicts I was thinking is to
generate a "cluster-node-unique" :next
property. Something like

    :next-System.nanoTime()-new Random(System.nanoTime()).nextLong()

by the fact that we're going to generate this one once in a while it
should not affect the performance too much by the usage of nanoTime.

So we should have in the end a list that looks something like

n0: {
    :next = ,
    :next-34567-4567 =,
    :next-76543-6543 =,
    :next-...
}

this should definitely avoid any concurrency.

But it definitely has to be merged. So it comes an async process that
runs on a single node (like the async index) in charge of touching the
:next and in the future generate all the lanes of the skip list.

What I would like to happen is something like: hey node A don't use any
longer the unique "4568-789" as I'm going to merge it for you. Then node
A generate a new ID and keep going. Once merged the async process will
delete the no longer used unique-id.

Other than the overall complexity of the algorithm I'm not sure on how
to achieve this message.

Any hints, ideas?

Thank you
Davide



Mime
View raw message