Chetan Mehrotra created OAK-1750:
------------------------------------
Summary: Adapt write concern dynamically to manage replication lag
Key: OAK-1750
URL: https://issues.apache.org/jira/browse/OAK-1750
Project: Jackrabbit Oak
Issue Type: Wish
Components: mongomk
Reporter: Chetan Mehrotra
Assignee: Chetan Mehrotra
Mongo provides write concern with varying level of durability and performance
characteristics [1]. When using replica sets its possible that replica member
lag behind in synching up the changes from primary. This introduces replication
lag which can increase if the write rate is quite high.
One of the recommended ways [2], [3] to mitigate such scenarios is to change
the write concern to higher values (journal ack, replica ack) to as to slow
down writes on primary
In MongoDocumentStore it can be supported in following way
# Have a periodic job which obtains current replSetGetStatus [4]
# Determine the potential lag from the command result
# if the lag is significant then change the write concern used in
MongoDocumentStore to Syned, Journal Ack, Replica ack etc
[1] http://docs.mongodb.org/manual/core/write-concern/
[2]
http://docs.mongodb.org/manual/tutorial/troubleshoot-replica-sets/#check-the-replication-lag
[3] http://blog.mongolab.com/2013/03/replication-lag-the-facts-of-life/
[4]
http://docs.mongodb.org/manual/reference/command/replSetGetStatus/#dbcmd.replSetGetStatus
--
This message was sent by Atlassian JIRA
(v6.2#6252)