jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chetan Mehrotra <chetan.mehro...@gmail.com>
Subject Running background operation on a single node in a Oak cluster
Date Wed, 20 Nov 2013 10:33:13 GMT
Hi,

Oak currently executes various task in background like Async Index
Update, Blob store garbage collection etc. While running multiple
instances of Oak in a cluster it would be desirable to run some job
only on one node in a cluster particularly Async Index Update.

Currently we schedule these jobs through WhiteboardUtils [1] . The
default implementation schedules it using an executor. However when we
run it in Sling based system the scheduling is handled via Sling
Commons Scheduler. Sometime back it added support for running the task
on only one node in a cluster [2]. This can be done by just adding an
extra property with the service registration.

Would it make sense to make use of this feature to run the Async Index
Update only on one node?. It would also help in avoiding the conflict
while concurrently updating the index related data in cluster.

For non Sling based system we would let the owning system provide this
support by providing right implementation of the WhiteBoard

Chetan Mehrotra

[1] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/whiteboard/WhiteboardUtils.java#L31
[2] https://issues.apache.org/jira/browse/SLING-2979

Mime
View raw message