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

Ensure memory associated with parsed DDL coordinator document is kept alive

    XMLWordPrintable

Details

    • Bug
    • Status: Backlog
    • Major - P3
    • Resolution: Unresolved
    • None
    • None
    • None
    • ALL
    • 0.5

    Description

      I realized that we actually have the same problem for all the classes that extend the ShardingDDLCoordinator.
      Many of the classes that extend the ShardingDDLCoordinator  parse their coordinator document at construction time. On the other hand our parsing implementation doesn't take ownership of nested BSONObj if they are not defined as object_owned, so if the coordinator document contains any nested object that is not owned, the parsed coordinator doc stored as a member of the coordinator instance will point to invalid memory.
      I find this very error prone, so I was thinking to store a serialized copy of the raw coordinator document in the ShardingDDLCoordinator parent class so that we can ensure that the memory associated with all the fields in the parsed coordinator document will remain alive until the coordinator instance is destructed.

      Attachments

        Activity

          People

            backlog-server-sharding-emea Backlog - Sharding EMEA
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: