Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-9100

add ability to repair or compact individual databases

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.2.3
    • Component/s: None
    • Labels:
      None

      We have the ability to compact individual collections, or all the databases, but we don't have the ability to compact individual databases.

      It takes us about a week and a half to repair all the databases; this is more time than we have available on our oplog. As a workaround, we've been compacting all of the collections individually.

      Unfortunately, we've found that for databases where lots of collections have been deleted, performance can actually degrade when we compact all of the collections because it opens up a lot of holes. We start to get warnings in the mongodb.log like:

      Sat Mar 23 01:24:30 [repl writer worker 16] warning: newExtent 179497 scanned

      ... and a query will grab the write lock for up to 2 minutes.

      As a workaround, we have been taking a secondary offline and doing a mongodump and mongorestore of individual databases in order to compact them. This is really cumbersome though, and it would be much better if we could simply tell it to compact one database at a time.

            Assignee:
            rassi J Rassi
            Reporter:
            charity@parse.com charity majors
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: