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

GH-44924: [R] Remove usage of cpp11's HAS_UNWIND_PROTECT #45261

Merged
merged 2 commits into from
Feb 19, 2025

Conversation

assignUser
Copy link
Member

@assignUser assignUser commented Jan 14, 2025

Rationale for this change

The macro is no longer required on R >= 4.0 which is our minimum version.

What changes are included in this PR?

Remove use of HAS_UNWIND_PROTECT

Are these changes tested?

ci

Are there any user-facing changes?

no

Comment on lines 48 to -53
bool CanRunWithCapturedR() {
#if defined(HAS_UNWIND_PROTECT)
return MainRThread::GetInstance().Executor() == nullptr;
#else
return false;
#endif
Copy link
Member

Choose a reason for hiding this comment

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

Do we need this function at all anymore? Or another way: does MainRThread::GetInstance().Executor() == nullptr ever return false?

Copy link
Member Author

Choose a reason for hiding this comment

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

🤷 I have no idea tbh. Just following the prompt from the cpp11 author ^^

Copy link
Member Author

Choose a reason for hiding this comment

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

ah, the header explains it, I'll update the comment but from how I read it we still need to check for the executor

// Unwind protection was added in R 3.5 and some calls here use it
// and crash R in older versions (ARROW-16201). Implementation provided
// in safe-call-into-r-impl.cpp so that we can skip some tests
// when this feature is not provided. This also checks that there
// is not already an event loop registered (via MainRThread::Executor()),
// because only one of these can exist at any given time.

Copy link
Member

Choose a reason for hiding this comment

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

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Jan 14, 2025
@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Jan 14, 2025
@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting change review Awaiting change review labels Jan 27, 2025
@assignUser assignUser merged commit 7167ed1 into apache:main Feb 19, 2025
11 of 12 checks passed
@assignUser assignUser removed the awaiting merge Awaiting merge label Feb 19, 2025
@assignUser assignUser deleted the remove-unwind-check branch February 19, 2025 11:11
jonkeane added a commit to jonkeane/arrow that referenced this pull request Feb 19, 2025
pitrou pushed a commit that referenced this pull request Feb 19, 2025
### Rationale for this change

Cleanup a minor formatting issue introduced in #45261

### What changes are included in this PR?

Remove two new lines

### Are these changes tested?

Yes operative changes, linter should pass

### Are there any user-facing changes?

No

Authored-by: Jonathan Keane <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
Copy link

After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 7167ed1.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 6 possible false positives for unstable benchmarks that are known to sometimes produce them.

kou pushed a commit to kou/arrow that referenced this pull request Feb 25, 2025
…e#45261)

### Rationale for this change

The macro is no longer required on R >= 4.0 which is our minimum version.

### What changes are included in this PR?

Remove use of HAS_UNWIND_PROTECT

### Are these changes tested?

ci
### Are there any user-facing changes?

no
* GitHub Issue: apache#44924

Authored-by: Jacob Wujciak-Jens <[email protected]>
Signed-off-by: Jacob Wujciak-Jens <[email protected]>
kou pushed a commit to kou/arrow that referenced this pull request Feb 25, 2025
### Rationale for this change

Cleanup a minor formatting issue introduced in apache#45261

### What changes are included in this PR?

Remove two new lines

### Are these changes tested?

Yes operative changes, linter should pass

### Are there any user-facing changes?

No

Authored-by: Jonathan Keane <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants