[SERVER-23526] Replication relies on storage engines reporting a non-zero size for correctness Created: 05/Apr/16 Updated: 22/Nov/16 Resolved: 15/Apr/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | WiredTiger |
| Affects Version/s: | None |
| Fix Version/s: | 3.2.6, 3.3.5 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Alexander Gorrod | Assignee: | Alexander Gorrod |
| 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 | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Backport Completed: | |||||||||||||
| Participants: | |||||||||||||
| Description |
|
The new inMemory storage engine does not necessarily return a non-zero storage size for collections, even when they contain data. The replication sub-system assumes that the size will be non-zero when there is content. Further analysis from sue.loverso: |
| Comments |
| Comment by Michael Cahill (Inactive) [ 19/Apr/16 ] | |||||||||||||||||||||||||||||||||||||||||||
|
keith.bostic, we'll need a new ticket, this one is fixed by the workaround of never having WiredTiger return a storage size of zero. | |||||||||||||||||||||||||||||||||||||||||||
| Comment by Keith Bostic (Inactive) [ 15/Apr/16 ] | |||||||||||||||||||||||||||||||||||||||||||
|
michael.cahill, I thought we were going to use this ticket to consider changing MongoDB to not check for a on-disk size of zero and removing the WiredTiger workaround; is there a purpose to that check? | |||||||||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 14/Apr/16 ] | |||||||||||||||||||||||||||||||||||||||||||
|
Author: {u'name': u'Ramon Fernandez', u'email': u'ramon@mongodb.com'}Message: Import wiredtiger-wiredtiger-2.8.0-201-g7ea2631.tar.gz from wiredtiger branch mongodb-3.2 ref: 43e885a..7ea2631
| |||||||||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 07/Apr/16 ] | |||||||||||||||||||||||||||||||||||||||||||
|
Author: {u'username': u'agorrod', u'name': u'Alex Gorrod', u'email': u'alexg@wiredtiger.com'}Message: Returning a zero size breaks MongoDB replication. Return a non-zero | |||||||||||||||||||||||||||||||||||||||||||
| Comment by Keith Bostic (Inactive) [ 05/Apr/16 ] | |||||||||||||||||||||||||||||||||||||||||||
|
One possible confusion here is an on-disk WiredTiger database will never have a zero-sized object, even an empty collection will take up some room on disk. So, any optimization based on zero-sized objects may not be useful, it won't ever fire. | |||||||||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 05/Apr/16 ] | |||||||||||||||||||||||||||||||||||||||||||
|
Author: {u'username': u'agorrod', u'name': u'Alex Gorrod', u'email': u'alexg@wiredtiger.com'}Message: Returning a zero size breaks MongoDB replication. Return a non-zero | |||||||||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 05/Apr/16 ] | |||||||||||||||||||||||||||||||||||||||||||
|
Author: {u'username': u'agorrod', u'name': u'Alex Gorrod', u'email': u'alexg@wiredtiger.com'}Message: Returning a zero size breaks MongoDB replication. Return a non-zero | |||||||||||||||||||||||||||||||||||||||||||
| Comment by Alexander Gorrod [ 05/Apr/16 ] | |||||||||||||||||||||||||||||||||||||||||||
|
To reproduce the failure, back out the workaround committed in
The repl8.js test fails because it never finishes an initial sync, error output:
|