protected function unlockAllDocuments($transaction_id)
    {
        $result = $this->getLocksCollection()->deleteMany(array(_LOCKED_FOR_TRANS => $transaction_id), array('w' => 1));

        if(!$result->isAcknowledged()) {
            $this->errorLog(MONGO_LOCK,
                array(
                    'description'=>'Driver::unlockAllDocuments - Failed to unlock documents (transaction_id - ' .$transaction_id .')',
                    'mongoDriverError' => $this->getLastDBError($this->getLocksDatabase()),
                    $result
                )
            );
            throw new \Exception("Failed to unlock documents as part of transaction : ".$transaction_id);
        }
        return true;
    }
protected function unlockAllDocuments($transaction_id)
    {
        $result = $this->getLocksCollection()->deleteMany(array(_LOCKED_FOR_TRANS => $transaction_id), array('w' => 1));

        if(!$result->isAcknowledged()) {
            $this->errorLog(MONGO_LOCK,
                array(
                    'description'=>'Driver::unlockAllDocuments - Failed to unlock documents (transaction_id - ' .$transaction_id .')',
                    'mongoDriverError' => $this->getLastDBError($this->getLocksDatabase()),
                    $result
                )
            );
            throw new \Exception("Failed to unlock documents as part of transaction : ".$transaction_id);
        }
        return true;
    }
protected function unlockAllDocuments ( $ transaction_id ) { $ result = $ this -> getLocksCollection ( ) -> deleteMany ( array ( _LOCKED_FOR_TRANS => $ transaction_id ) , array ( 'w' => 1 ) ) ; if ( ! $ result -> isAcknowledged ( ) ) { $ this -> errorLog ( MONGO_LOCK , array ( 'description' => 'Driver::unlockAllDocuments - Failed to unlock documents (transaction_id - ' . $ transaction_id . ')' , 'mongoDriverError' => $ this -> getLastDBError ( $ this -> getLocksDatabase ( ) ) , $ result ) ) ; throw new \ Exception ( "Failed to unlock documents as part of transaction : " . $ transaction_id ) ; } return true ; }
Unlocks documents locked by current transaction
@param string $transaction_id id for this transaction
@return bool
@throws \Exception is thrown if for any reason the update to mongo fails
Unlocks documents locked by current transaction