public function open()
    {
        if ($this->cluster !== null) {
            return;
        }

        if (empty($this->dsn)) {
            throw new InvalidConfigException($this->className() . '::dsn cannot be empty.');
        }

        $token = 'Opening Couchbase connection: ' . $this->dsn;

        try {
            Yii::trace($token, __METHOD__);
            Yii::beginProfile($token, __METHOD__);

            $this->cluster = new Cluster($this->dsn);

            $this->initConnection();

            Yii::endProfile($token, __METHOD__);
        }
        catch (\Exception $e) {
            Yii::endProfile($token, __METHOD__);

            throw new Exception($e->getMessage(), (int)$e->getCode(), $e);
        }
    }