New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There is no need to undo changes made in GTT created with ON COMMIT DELETE ROWS option when transaction is rolled back. [CORE3537] #3894
Comments
Modified by: @hvladassignee: Vlad Khorsun [ hvlad ] |
Modified by: @hvladstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 2.5.1 [ 10333 ] Fix Version: 3.0 Alpha 1 [ 10331 ] |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Commented by: @pavel-zotov > If amount of such changes was ***not*** big, Firebird undoes them and marks transaction in TIP as commited. How it can be verified that FB does not do undo at ROLLBACK for GTT with 'ON COMMIT DELETE ROWS' ? For example, consider following test: === recreate global temporary table t_gtt_del_rows( recreate global temporary table t_gtt_sav_rows( commit; set term ^; execute block as execute block as === Every EB makes (as it seems to me) NOT big amount of changes: insert 20'000 rows with length = 200 characters. (1): 2593 ms, 28568 read(s), 22137 write(s), 298186 fetch(es), 72187 mark(s) Statistics in ROLLBACK for GTT on commit DELETE rows, shown above in (2), really is much less than for two other cases. |
Commented by: Attila Molnár (e_pluribus_unum) Hi! If no undo log exists for GTT, then rollback to <savepoint> does not work on it? |
Commented by: @hvlad Pavel, > How it can be verified that FB does not do undo at ROLLBACK for GTT with 'ON COMMIT DELETE ROWS' ? > But it is NOT zero. So, what else FB did in this "(2)" ? From where these non-zero values ? |
Commented by: @hvlad Attila, > If no undo log exists for GTT, then rollback to <savepoint> does not work on it? undo log *exists* for GTT's |
Commented by: @pavel-zotov > Engine still must mark formerly used pages (pointer pages, data pages and index pages) as free on page inventory page(s). Vlad, thanks. Now I recall that you've explained this to me some years ago, but again forgot :-[ |
Modified by: @pavel-zotovstatus: Closed [ 6 ] => Closed [ 6 ] QA Status: Done successfully Test Details: Multiple measurements of ratio between fetches and marks when operation is done on: |
Submitted by: @hvlad
When transaction is rolled back it should undo all changes made in its context.
If amount of such changes was not big, Firebird undoes them and marks
transaction in TIP as commited. For GTT created with ON COMMIT DELETE
ROWS option such undo have no sence as all its data will be released anyway
after rollback.
Commits: d5faade f12c243
====== Test Details ======
Multiple measurements of ratio between fetches and marks when operation is done on:
1) fixed tab; 2) GTT with on commit PRESERVE rows and 3) GTT with on commit DELETE rows
-- show that it's value is ~2.7 for FB 2.5 and ~2.2 for FB 3.0
The text was updated successfully, but these errors were encountered: