Skip to content
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

Extend trace record for COMMIT/ROLLBACK RETAINING to allow chaining of transaction ids [CORE6095] #6344

Closed
firebird-issue-importer opened this issue Jul 4, 2019 · 7 comments

Comments

@firebird-issue-importer
Copy link

@firebird-issue-importer firebird-issue-importer commented Jul 4, 2019

Submitted by: @pcisar

After commit\rollback retaining transaction has a new number (but only when there are any changes to the database). This significantly complicates analysis of trace reports, as it's not easy to link events to the transaction context as transaction may change identity.

It would be nice if trace entry for COMMIT/ROLLBACK RETAINING events would include both: original (or previous) transaction ID and new transaction ID, so trace log parsers could properly link events to transactions and retaining transactions into a chain.

Commits: 25d6fd4 c77d381

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 4, 2019

Modified by: @pcisar

summary: Extend trace record for COMMIT/ROLLBACK RETAINING to allow cjaing of transaction ids => Extend trace record for COMMIT/ROLLBACK RETAINING to allow chaing of transaction ids

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 4, 2019

Modified by: @pcisar

summary: Extend trace record for COMMIT/ROLLBACK RETAINING to allow chaing of transaction ids => Extend trace record for COMMIT/ROLLBACK RETAINING to allow chaining of transaction ids

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 4, 2019

Modified by: @hvlad

assignee: Vlad Khorsun [ hvlad ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 8, 2019

Commented by: @hvlad

I going to commit following changes:

a) transaction identifier could now contain optional "initial transaction number":

(TRA_1060843, INIT_1060842, CONCURRENCY | WAIT | READ_WRITE)

here TRA_1060843 is a current transaction number 1060843 and INIT_1060842 shows that initial transaction number was 1060842

Note, if transaction was never commited\rolled back with retaining option, its initial number is equal to the current one.

b) COMMIT_RETAINING and ROLLBACK_RETAINING events reports old transaction identifier and appends line with new transaction number:

2019-07-08T23:26:33.3550 (16220:00000000388A0040) COMMIT_RETAINING
S:\TEMP\A.30.FDB (ATT_2412, SYSDBA:NONE, NONE, <internal>)
(TRA_1060844, CONCURRENCY | WAIT | READ_WRITE)
New number 1060845
2 ms, 6 write(s), 6 fetch(es), 4 mark(s)

here "(TRA_1060844, CONCURRENCY | WAIT | READ_WRITE)" is old transaction identifier, as it reported in events before COMMIT_RETAINING, and
"New number 1060845" is a new line with new transaction ID assigned by COMMIT_RETAINING.
Note, new number could be the same as old number - if transaction modifies no rows.

After such "commit\rollback retaining" event transaction identifier will be reported appended with its initial number:

2019-07-08T23:26:37.0390 (16220:00000000388A0040) EXECUTE_STATEMENT_FINISH
S:\TEMP\A.30.FDB (ATT_2412, SYSDBA:NONE, NONE, <internal>)
(TRA_1060845, INIT_1060844, CONCURRENCY | WAIT | READ_WRITE)

2019-07-08T23:27:03.5050 (16220:00000000388A0040) COMMIT_RETAINING
S:\TEMP\A.30.FDB (ATT_2412, SYSDBA:NONE, NONE, <internal>)
(TRA_1060845, INIT_1060844, CONCURRENCY | WAIT | READ_WRITE)
New number 1060847
2 ms, 6 write(s), 6 fetch(es), 4 mark(s)

and so on.

Comments ?

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 24, 2020

Modified by: @hvlad

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 4.0 Beta 2 [ 10888 ]

Fix Version: 3.0.5 [ 10885 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 24, 2020

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: No test => Done successfully

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 24, 2020

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants