-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: WiredTiger
-
None
-
Storage Execution
-
ALL
The code to handle "negative" sizes seems to have several issues.
1. We can return size of things that aren't committed and possibly nonsensical to users (eg negative values).
2. There's races in things doing fetch then store. Data is lost if someone updates before the store
if (_numRecords.fetchAndAdd(diff) < 0) _numRecords.store(diff);
3. Tradeoffs of not being able to see your own uncommited changes vs everyone else being able to see your uncommited changes - I think we took the wrong path here, and would be better to update on commit. Need to further consider implications.
4. If we update on commit, need to do something about when we cap collections
- duplicates
-
SERVER-24266 Large discrepancy in SizeStorer after unclean shutdown
- Open
- is duplicated by
-
SERVER-23124 db.collection.count() returns -1
- Closed