huge pages - Can MongoDB manage RollBack procedure more then 300 MB Streaming Data? -


i dealing rollback procedures of mongodb. problem rollback huge data may bigger 300 mb or more.

is there solution problem? error log

 replset syncthread: replset data roll 

in official mongodb document, not see solution.

thanks answers.

the cause

the page rollbacks during replica set failover states:

a rollback necessary if primary had accepted write operations secondaries had not replicated before primary stepped down. when primary rejoins set secondary, reverts, or “rolls back,” write operations maintain database consistency other members.

and:

when rollback occur, result of network partition.

in other words, rollback scenario typically occur this:

  1. you have 3-nodes replica set setup of primary-secondary-secondary.
  2. there network partition, separating current primary , secondaries.
  3. the 2 secondaries cannot see former primary, , elected 1 of them new primary. applications replica-set aware writing new primary.
  4. however, writes keep coming old primary before realized cannot see rest of set , stepped down.

the data written old primary in step 4 above data rolled back, since period of time, acting "false" primary (i.e., "real" primary supposed elected secondary in step 3)

the fix

mongodb not perform rollback if there more 300 mb of data rolled back. message seeing (replset data roll back) means hitting situation, , either have save rollback directory under node's dbpath, or perform initial sync.

preventing rollbacks

configuring application using w: majority (see write concern , write concern replica sets) prevent rollbacks. see avoid replica set rollbacks more details.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -