private function executeAggregate(Server $server)
    {
        /* If we've already captured an operation time or the server does not
         * support returning an operation time (e.g. MongoDB 3.6), execute the
         * aggregation directly and return its cursor. */
        if ($this->operationTime !== null || ! \MongoDB\server_supports_feature($server, self::$wireVersionForOperationTime)) {
            return $this->aggregate->execute($server);
        }

        /* Otherwise, execute the aggregation using command monitoring so that
         * we can capture its operation time with commandSucceeded(). */
        \MongoDB\Driver\Monitoring\addSubscriber($this);

        try {
            return $this->aggregate->execute($server);
        } finally {
            \MongoDB\Driver\Monitoring\removeSubscriber($this);
        }
    }