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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.2
    • Component/s: None
    • Labels:
    • Environment:
      Linux 64 bit mongoDB 1.6.5
    • Operating System:
      ALL

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: