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

Raise an ERROR instead of causing a crash when backend data is not init #7806

Merged
merged 1 commit into from
Dec 26, 2024

Conversation

tejeswarm
Copy link
Contributor

@tejeswarm tejeswarm commented Dec 24, 2024

DESCRIPTION: Avoids a crash that could happen if another extension breaks auth-hook chain.

Bug 3697586: Server crashes when assigning distributed transaction

There is a bug in the Azure extension's auth hook not calling the Citus auth hook (which we already fixed), which caused the uninitialized MyBackendData. However, we should add this check in AssignDistributedTransactionId as an extra protection to prevent crashing with a segmentation fault (SEGV).

We already have such checks in assign_distributed_transaction_id

image

…stributed transaction: Raise an ERROR instead of a crash
@tejeswarm tejeswarm changed the title Raise an ERROR instead of a crash Raise an ERROR instead of causing a crash Dec 24, 2024
Copy link

codecov bot commented Dec 24, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 89.69%. Comparing base (7341191) to head (1ec719c).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7806      +/-   ##
==========================================
- Coverage   89.70%   89.69%   -0.01%     
==========================================
  Files         283      283              
  Lines       60515    60519       +4     
  Branches     7542     7543       +1     
==========================================
+ Hits        54284    54285       +1     
- Misses       4074     4077       +3     
  Partials     2157     2157              

Copy link
Member

@onurctirtir onurctirtir left a comment

Choose a reason for hiding this comment

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

After merging the PR, need to backport to 12.1 too.

@onurctirtir onurctirtir changed the title Raise an ERROR instead of causing a crash Raise an ERROR instead of causing a crash when backend data is not init Dec 25, 2024
@tejeswarm tejeswarm merged commit ab7c13b into main Dec 26, 2024
121 of 122 checks passed
@tejeswarm tejeswarm deleted the add-check branch December 26, 2024 18:46
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.

2 participants