[SERVER-23795] master/slave looks at on-disk size on a resync Created: 19/Apr/16 Updated: 22/Nov/16 Resolved: 03/Jun/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 3.2.9, 3.3.8 |
| Type: | Task | Priority: | Minor - P4 |
| Reporter: | Keith Bostic (Inactive) | Assignee: | Michael Cahill (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | code-only | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Backport Completed: | |||||||||
| Participants: | |||||||||
| Description |
|
The WiredTiger inMemory storage engine originally returned zero as the on-disk size for collections. The replication sub-system assumes on-disk sizes will be non-zero whenever there is content. Further analysis from sue.loverso:
There's currently a hack in WiredTiger (see __im_handle_size) to never return a storage size of 0. It would be good to understand the MongoDB code, and if possible, remove the WiredTiger hack. |
| Comments |
| Comment by Githook User [ 27/Jul/16 ] | |||||||||||
|
Author: {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'}Message: (cherry picked from commit b730f98c9e6c26fe564c6a25612634058ae2dd22) | |||||||||||
| Comment by Githook User [ 03/Jun/16 ] | |||||||||||
|
Author: {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'}Message: | |||||||||||
| Comment by Eric Milkie [ 27/Apr/16 ] | |||||||||||
|
That seems totally reasonable. if all the tests pass, that is sufficient proof for me that this change is good. | |||||||||||
| Comment by Michael Cahill (Inactive) [ 27/Apr/16 ] | |||||||||||
|
milkie, maybe something like this is the answer?
In the case of WiredTiger / inMemory, databases will only be empty if they have no collections. If this doesn't seem insane, let me know and I'll work up a patch and put it through testing. | |||||||||||
| Comment by Eric Milkie [ 20/Apr/16 ] | |||||||||||
|
The code is in master/slave and I think it is simply attempting to skip databases with no content because they are "ghost" databases (since databases are implicitly created and used to be created just by trying to observe them, without any writes involved). |