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

Inserting into a capped collection an object larger than max size fails silently

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.1.2
    • Affects Version/s: None
    • Component/s: None
    • Environment:
      Linux 64 bit mongoDB 1.6.5
    • ALL

      I have a capped collection with max: 1 and size :10000

      If I insert/update an object that is larger than 10000 bytes the returned _id is a valid ID, i.e. the insert does not croak, but no data is inserted.
      In my case the existing data was not replaced with the new data, instead the existing data was deleted but the new data was not inserted because it was larger than 10000 bytes.

      I've not tried to insert data larger than max size of 10000 bytes with any other method so I'm not sure if it is a problem with the Perl driver or with mongoDB it self.

      Of course it was easy to fix by increasing the size to more than 10000 but the insert should at least fail as I was not expecting to lose existing data and ending up with no data at all.

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            jlhm Jonas Lindholm
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: