Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-1409

Add CommandStartedEvent to CommandSucceedEvent/CommandFailedEvent

      Original ticket:
      GODRIVER-1761 requests that a databaseName property be added to CommandFailedEvent because storing the corresponding CommandStartedEvent and then retrieving it via the requestId field requires keeping a thread-safe map and the user says that this hurts their performance in highly concurrent applications.

      Instead of duplicating fields like this across all three event types, would it be feasible to store a reference to the CommandStartedEvent in both CommandSucceedEvent and CommandFailedEvent? It would solve this specific issue and would also present a simpler API for users that only want to loop at a started/finished pair because they could register handlers for succeeded/failed and not have to register one for started.

      Summary of discussion:
      We will update the spec to state that drivers may store a CommandStartedEvent in a CommandSucceededEvent/CommandFailedEvent as an implementation detail if it makes sense for them.

            Assignee:
            Unassigned Unassigned
            Reporter:
            divjot.arora@mongodb.com Divjot Arora (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: