Do journal rollback
481761
def rollback(self):
        

        # Close the journal for writing, if this is an automatic rollback following a crash,
        # the file descriptor will not be open, so don't need to do anything.
        if self.journal != None: self.journal.close()
        self.journal = None

        # Read the journal
        journ_list = []
        with open(self.j_file) as fle:
            for l in fle: journ_list.append(json.loads(l))

        journ_subtract = deque(reversed(journ_list))

        for j_itm in reversed(journ_list):
            try: self.do_action({'do' : j_itm}, False)
            except IOError: pass

            # As each item is completed remove it from the journal file, in case
            # something fails during the rollback we can pick up where it stopped.
            journ_subtract.popleft()
            with open(self.j_file, 'w') as f:
                for data in list(journ_subtract):
                    f.write(json.dumps(data) + "\n")
                f.flush()

        # Rollback is complete so delete the journal file
        os.remove(self.j_file)
716392
def rollback(self):
        """"""
        commands = []
        commands.append('configure replace flash:rollback-0')
        commands.append('write memory')
        self.device.run_commands(commands)
938903
public function rollback()
    {
        if (!$this->recv) {
            $this->receive();
            App::error('You forget to getResult() before rollback !');
        }
        $this->connection->query('rollback;');
    }
299719
def rollback(self):
        
        if hasattr(self.local, 'tx') and self.local.tx:
            tx = self.local.tx.pop()
            tx.rollback()
            self._flush_tables()
229517
public function rollBack()
	{
		if ( $this->transactions == 1 )
		{
			$this->getPdo()->rollBack();
		}
		elseif ( $this->transactions > 1 && $this->queryGrammar->supportsSavepoints() )
		{
			$this->getPdo()->exec( $this->queryGrammar->compileSavepointRollBack( 'trans' . $this->transactions ) );
		}

		$this->transactions = max( 0, $this->transactions - 1 );

		$this->fireConnectionEvent( 'rollingBack' );
	}
53323
void rollback()
	{
		switch (data_type)
		{
		case Tango_DEV_BOOLEAN :
			bool_val = old_bool_val;
			break;
		
		case Tango_DEV_SHORT :
			short_val = old_short_val;
			break;
		
		case Tango_DEV_LONG :
			long_val = old_long_val;
			break;
		
		case Tango_DEV_LONG64 :
			long64_val = old_long64_val;
			break;
		
		case Tango_DEV_DOUBLE :
			double_val = old_double_val;
			break;
		
		case Tango_DEV_STRING :
			str_val = old_str_val;
			break;
		}
	}
1296584
def rollback(self):
        """"""
        if self._transaction_nesting_level == 0:
            raise DBALConnectionError.no_active_transaction()

        self.ensure_connected()
        if self._transaction_nesting_level == 1:
            self._transaction_nesting_level = 0
            self._driver.rollback()
            self._is_rollback_only = False
            if not self._auto_commit:
                self.begin_transaction()
        elif self._nest_transactions_with_savepoints:
            self.rollback_savepoint(self._get_nested_transaction_savepoint_name())
            self._transaction_nesting_level -= 1
        else:
            self._is_rollback_only = True
            self._transaction_nesting_level -= 1
431941
protected function rollback_transaction() {
        $this->query_start('--oracle_rollback', NULL, SQL_QUERY_AUX);
        $result = oci_rollback($this->oci);
        $this->commit_status = OCI_COMMIT_ON_SUCCESS;
        $this->query_end($result);
    }
868893
void rollbackResources()
    {
        final boolean traceOn = TraceComponent.isAnyTracingEnabled();

        if (traceOn && tc.isEntryEnabled())
            Tr.entry(tc, "rollbackResources", this);

        distributeEnd(XAResource.TMFAIL);
        _outcome = false;
        _retryRequired = distributeOutcome();

        if (traceOn && tc.isEntryEnabled())
            Tr.exit(tc, "rollbackResources", _retryRequired);
    }
487264
public void flush() throws JournalException
    {
    	if (failing)
    		throw new JournalException("Store journal is failing");
    	
    	boolean newFlushRequired = false;
    	synchronized (journalWriteQueue)
        {
    		if (unflushedJournalSize > maxUnflushedJournalSize)
    		{
    			newFlushRequired = !flushingJournal;
    			if (newFlushRequired)
    				flushingJournal = true;
    			unflushedJournalSize = 0;
    		}
        }
    	
    	// Flush journal to store (asynchronous)
    	if (newFlushRequired)
        {
        	try
        	{
        		asyncTaskManager.execute(flushJournalAsyncTask);
        	}
        	catch (JMSException e)
        	{
        		throw new JournalException("Cannot flush journal asynchronously : "+e);
        	}
        }
    }
1060908
def rollback(self):
        
        logger.info('Rolling back changes')

        config_text = self.compare_config(other=self.original_config)

        if len(config_text) > 0:
            return self._commit(config_text, force=True, reload_original_config=False)
14655
def rollback(self):
        """"""
        for p in self._moves:
            logging.info("Moving to %s\n from %s", *p)

        for new_path, path in self._moves:
            try:
                logger.debug('Replacing %s from %s', new_path, path)
                if os.path.isfile(new_path):
                    os.unlink(new_path)
                elif os.path.isdir(new_path):
                    rmtree(new_path)
                renames(path, new_path)
            except OSError as ex:
                logger.error("Failed to restore %s", new_path)
                logger.debug("Exception: %s", ex)

        self.commit()
421530
def rollback(self, date):
        """"""
        if self.onOffset(date):
            return date
        else:
            return date - YearBegin(month=self.month)
592068
public void rollbackClientWrongInput(List articles, List persons)
    {
        log.info("rollbackClientWrongInput method was called");
        ArticleManagerODMGLocal am = getArticleManager();
        PersonManagerODMGLocal pm = getPersonManager();
        am.storeArticles(articles);
        pm.storePersons(persons);
    }
1022756
function rollback(client, done, error, callback) {
  client.query('ROLLBACK', rollbackError => {
    done(rollbackError);
    return callback(rollbackError || error, null);
  });
}
723702
def rollback(self, date):
        """"""
        if self.onOffset(date):
            return date
        else:
            return date - YearEnd(month=self.month)
1123216
def rollback(self):
        
        self.logger.info("Rolling back context: %s", self.initial_offsets)
        self.update_consumer_offsets(self.initial_offsets)