[SERVER-17807] drain ops before restarting initial sync Created: 30/Mar/15  Updated: 25/Apr/16  Resolved: 29/Apr/15

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 3.0.1
Fix Version/s: 3.0.4, 3.1.3

Type: Bug Priority: Major - P3
Reporter: Eric Milkie Assignee: Scott Hernandez (Inactive)
Resolution: Done Votes: 0
Labels: UT
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-18326 Rollback attempted during initial syn... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Steps To Reproduce:

http://buildlogs.mongodb.org/MCI_linux-64/builds/860534/test/noPassthrough_WT_0/initial_sync_cloner_dups.js

Sprint: RPL 1 04/03/15, RPL 3 05/15/15
Participants:
Linked BF Score: 0

 Description   

Depending on the failure mode, it is possible for unapplied operations to remain in the buffer after initial sync fails. When initial sync retries, it may discover unapplied operations already present in the buffer.

Log sample:

2015-03-26T21:52:01.542+0000 I REPL     [rsSync] initial sync data copy, starting syncup
2015-03-26T21:52:01.543+0000 I REPL     [rsSync] oplog sync 1 of 3
2015-03-26T21:52:01.728+0000 I -        [rsBackgroundSync] Assertion: 16235:going to start syncing, but buffer is not empty
2015-03-26T21:52:01.732+0000 I CONTROL  [rsBackgroundSync] 
0xef3559 0xea2551 0xe8621f 0xbbc8cb 0xbbe1b4 0xbbe258 0xf43943 0x2ab779a0f83d 0x2ab779cfafcd
 ----- BEGIN BACKTRACE -----
{"backtrace":[{"b":"400000","o":"AF3559"},{"b":"400000","o":"AA2551"},{"b":"400000","o":"A8621F"},{"b":"400000","o":"7BC8CB"},{"b":"400000","o":"7BE1B4"},{"b":"400000","o":"7BE258"},{"b":"400000","o":"B43943"},{"b":"2AB779A09000","o":"683D"},{"b":"2AB779C26000","o":"D4FCD"}],"processInfo":{ "mongodbVersion" : "3.1.1-pre-", "gitVersion" : "8a805598bbcb2ac20c345e0734c9fbd4c4722cb0", "uname" : { "sysname" : "Linux", "release" : "2.6.18-194.el5xen", "version" : "#1 SMP Tue Mar 16 22:01:26 EDT 2010", "machine" : "x86_64" }, "somap" : [ { "elfType" : 2, "b" : "400000" }, { "b" : "2AB778E6A000", "path" : "/lib64/librt.so.1", "elfType" : 3 }, { "b" : "2AB779073000", "path" : "/lib64/libdl.so.2", "elfType" : 3 }, { "b" : "2AB779277000", "path" : "/usr/lib64/libstdc++.so.6", "elfType" : 3 }, { "b" : "2AB779578000", "path" : "/lib64/libm.so.6", "elfType" : 3 }, { "b" : "2AB7797FB000", "path" : "/lib64/libgcc_s.so.1", "elfType" : 3 }, { "b" : "2AB779A09000", "path" : "/lib64/libpthread.so.0", "elfType" : 3 }, { "b" : "2AB779C26000", "path" : "/lib64/libc.so.6", "elfType" : 3 }, { "b" : "2AB778C4C000", "path" : "/lib64/ld-linux-x86-64.so.2", "elfType" : 3 } ] }}
mongod(_ZN5mongo15printStackTraceERSo+0x29) [0xef3559]
mongod(_ZN5mongo10logContextEPKc+0xE1) [0xea2551]
mongod(_ZN5mongo11msgassertedEiPKc+0xAF) [0xe8621f]
mongod(_ZN5mongo4repl14BackgroundSync5startEPNS_16OperationContextE+0x2FB) [0xbbc8cb]
mongod(_ZN5mongo4repl14BackgroundSync15_producerThreadEv+0xA4) [0xbbe1b4]
mongod(_ZN5mongo4repl14BackgroundSync14producerThreadEv+0x68) [0xbbe258]
mongod(+0xB43943) [0xf43943]
libpthread.so.0(+0x683D) [0x2ab779a0f83d]
libc.so.6(clone+0x6D) [0x2ab779cfafcd]



 Comments   
Comment by Githook User [ 01/Jun/15 ]

Author:

{u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}

Message: SERVER-17807: reset state before starting intial sync attempt

(cherry picked from commit 2b0ad1da1d85b034bb4d958707755a74b2c54e96)
Branch: v3.0
https://github.com/mongodb/mongo/commit/2d1b0186696872e3c15b61fb354cb09f9d34c563

Comment by Githook User [ 29/Apr/15 ]

Author:

{u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}

Message: SERVER-17807: reset state before starting intial sync attempt
Branch: master
https://github.com/mongodb/mongo/commit/2b0ad1da1d85b034bb4d958707755a74b2c54e96

Generated at Thu Feb 08 03:45:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.