in Databases
601 views
0 votes
0 votes
Is there any priority in which order Undo and Redo operations will be performed in case of transaction failure? Do We perform all undos first and then all redos?
in Databases
by
601 views

2 Answers

0 votes
0 votes
there is no priority
0 votes
0 votes
LOG:

savepoint

<transactions>

commit

transactions

 

here when there is failure the log is read line by line so in the above case it will redo all the commited transactions after the save point and undo all the transactions which are not committed

 

if there are only committed transactions after savepoint and no uncommiteed transactions then only redo is done

if there are only uncommitted transactions after savepoint and no commiteed transactions then only undo is done

i think there is need to be some order as after undoing we cannot redo which will give inconsistent data i think