You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Michael Marth (JIRA)" <ji...@apache.org> on 2014/04/22 13:11:16 UTC
[jira] [Commented] (OAK-1750) Adapt write concern dynamically to
manage replication lag
[ https://issues.apache.org/jira/browse/OAK-1750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13976638#comment-13976638 ]
Michael Marth commented on OAK-1750:
------------------------------------
[~chetanm], if you change the write concern to "replica ack" in situations where the replica members already lag behind: would that block the first write that is made with the new write concern until the replication queue is worked through?
Anyway, I am not sure if we want to slow down writes in such situations. But if we do, we could consider the Commit Hook that [~mduerig] provided to limit commit rates (OAK-1659).
> 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)