[SERVER-26528] Add additional logging when sync source is changed or cleared Created: 07/Oct/16 Updated: 05/Apr/17 Resolved: 16/Dec/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 3.4.2, 3.5.2 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Spencer Brody (Inactive) | Assignee: | Judah Schvimer |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Backport Requested: |
v3.4
|
||||||||||||||||||||
| Sprint: | Repl 2016-12-12, Repl 2017-01-23 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||||||
| Description |
|
Sometimes we get log messages like "SyncSourceFeedback error sending update to WIN-K6DURTQEFVN:20012: InvalidSyncSource: Sync target is no longer valid" that don't tell you why the sync target is no longer valid. We should log any time we decide to clear our current sync source why we are doing so. |
| Comments |
| Comment by Judah Schvimer [ 28/Dec/16 ] |
|
Author: {u'username': u'judahschvimer', u'name': u'Judah Schvimer', u'email': u'judah@mongodb.com'}Message: (cherry picked from commit 0cd2bf29d5798a395a07e67ae79ede9a5cefd411) |
| Comment by Judah Schvimer [ 16/Dec/16 ] |
|
Committed with the wrong ticket number Message: |
| Comment by Judah Schvimer [ 09/Dec/16 ] |
|
Whenever we see "could not find member to sync from" it should be clear why we tried to choose a new sync source in the first place. |
| Comment by Judah Schvimer [ 25/Oct/16 ] |
|
There are also times when TopologyCoordinatorImpl::shouldChangeSyncSource() returns true and we don't log the reason why: https://github.com/mongodb/mongo/blob/c9b9187faa1c29553e4841761803fa8cbee55f18/src/mongo/db/repl/topology_coordinator_impl.cpp#L2450. This does not happen very often, so it would be good to log. |
| Comment by Judah Schvimer [ 25/Oct/16 ] |
|
One change should definitely be here: "re-evaluating sync source..." should include the sync source. |
| Comment by Spencer Brody (Inactive) [ 07/Oct/16 ] |
|
Agreed, but we need to also include why we're changing or clearing it. |
| Comment by Eric Milkie [ 07/Oct/16 ] |
|
It's not just when we clear it, it's whenever it changes. We should probably just change the message to say "Sync source changed to xxxx" or "Sync source was cleared" as appropriate. |