Skip to content

Suppress trace events for internal metadata transactions - #9212

Open
MochalovAlexey wants to merge 1 commit into
FirebirdSQL:masterfrom
MochalovAlexey:metadata-transaction-trace
Open

MochalovAlexey wants to merge 1 commit into
FirebirdSQL:masterfrom
MochalovAlexey:metadata-transaction-trace

Conversation

@MochalovAlexey

Copy link
Copy Markdown
Contributor

This PR suppresses transaction start and end (commit/rollback) trace events for internal metadata transactions, which started appearing after the metadata cache was introduced.

The TRA_meta flag is used to exclude these internal transactions from transaction start and end tracing.

Comment thread src/jrd/Attachment.cpp
{
if (!att_meta_transaction)
{
// TRA_meta is not stored in tra_flags by TRA_start(), it's set below after unlinkFromAttachment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not fix it in TRA_start ? Set same flag two times looks weird, at least.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hvlad TRA_meta was added to ensure correct unlink of meta transaction from attachment - if it's set on creation transaction will never be removed from linked list which cause problems in a lot of places in the code. I doubt we should change that usage of the flag.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean - why TRA_start() can't keep this flag ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it can after some modifications.
@MochalovAlexey Looks like PR to be slightly changed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants