[SERVER-4829] Compact command needs to update datasize Created: 31/Jan/12  Updated: 11/Jul/16  Resolved: 08/Feb/12

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 2.1.1

Type: Bug Priority: Major - P3
Reporter: Mathias Stearn Assignee: Eric Milkie
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File compact_size.patch    
Issue Links:
Related
Operating System: ALL
Participants:

 Description   

Attached patch is one way to do this. Could also just keep track of total size and update at end. That would be less crash safe, but would ensure correctness if the field is currently off due to prior compacts.



 Comments   
Comment by auto [ 08/Feb/12 ]

Author:

{u'login': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}

Message: SERVER-4829 update datasize and number of records after a compact

This code zeroes out the counters at the start of compaction and
then updates them after each extent is compacted.
Branch: master
https://github.com/mongodb/mongo/commit/46d33235a2285f83d904b9290f2cee02d9bb333b

Comment by auto [ 07/Feb/12 ]

Author:

{u'login': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}

Message: Revert "SERVER-4829 update datasize and number of records after a compact"

This reverts commit 712c4f888b39ac71f66b452685638acfb3b55665.
Unit test is failing on buildslaves; counts of records for
indexes may be messing things up.
Branch: master
https://github.com/mongodb/mongo/commit/7b9fe4a2ef6460eaa19859ef825b00fdd583fcce

Comment by auto [ 06/Feb/12 ]

Author:

{u'login': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}

Message: SERVER-4829 update datasize and number of records after a compact
Branch: master
https://github.com/mongodb/mongo/commit/712c4f888b39ac71f66b452685638acfb3b55665

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