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-38382: [R] Explicitly clean up arrow_duck_connection() on exit #38495

Merged
merged 6 commits into from
Nov 1, 2023

Conversation

paleolimbot
Copy link
Member

@paleolimbot paleolimbot commented Oct 27, 2023

Rationale for this change

We get lots of warning messages about unclosed connections when running tests + users get them on exit when they weren't expecting them.

What changes are included in this PR?

A finalizer was added on exit to close the global arrow_duck_con that we cache in the global options.

Are these changes tested?

Yes, the finalizer will run in every test that runs to_duckb() with the default connection.

Are there any user-facing changes?

No.

@github-actions
Copy link

⚠️ GitHub issue #38382 has been automatically assigned in GitHub to PR creator.

@paleolimbot
Copy link
Member Author

@amoeba Can you give this a quick review? All the R CI jobs are currently failing due to a dbplyr update and this PR contains a fix!

@amoeba
Copy link
Member

amoeba commented Oct 31, 2023

Hey @paleolimbot, this looks good to me. Thanks for taking care if both things.

@thisisnic
Copy link
Member

@github-actions crossbow submit -g r

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting committer review Awaiting committer review labels Nov 1, 2023
Copy link

github-actions bot commented Nov 1, 2023

Revision: 9b9186a

Submitted crossbow builds: ursacomputing/crossbow @ actions-0487ce50cd

Task Status
conda-linux-aarch64-cpu-r42 Azure
conda-linux-aarch64-cpu-r43 Azure
conda-linux-x64-cpu-r42 Azure
conda-linux-x64-cpu-r43 Azure
conda-osx-arm64-cpu-r42 Azure
conda-osx-arm64-cpu-r43 Azure
conda-osx-x64-cpu-r42 Azure
conda-osx-x64-cpu-r43 Azure
conda-win-x64-cpu-r41 Azure
r-binary-packages Github Actions
test-fedora-r-clang-sanitizer Azure
test-r-arrow-backwards-compatibility Github Actions
test-r-depsource-bundled Azure
test-r-depsource-system Github Actions
test-r-dev-duckdb Github Actions
test-r-devdocs Github Actions
test-r-gcc-11 Github Actions
test-r-gcc-12 Github Actions
test-r-install-local Github Actions
test-r-install-local-minsizerel Github Actions
test-r-library-r-base-latest Azure
test-r-linux-as-cran Github Actions
test-r-linux-rchk Github Actions
test-r-linux-valgrind Azure
test-r-minimal-build Azure
test-r-offline-maximal Github Actions
test-r-offline-minimal Azure
test-r-rhub-debian-gcc-devel-lto-latest Azure
test-r-rhub-debian-gcc-release-custom-ccache Azure
test-r-rhub-ubuntu-gcc-release-latest Azure
test-r-rstudio-r-base-4.1-opensuse153 Azure
test-r-rstudio-r-base-4.2-centos7-devtoolset-8 Azure
test-r-rstudio-r-base-4.2-focal Azure
test-r-ubuntu-22.04 Github Actions
test-r-versions Github Actions
test-ubuntu-r-sanitizer Azure

@thisisnic thisisnic merged commit 57c028f into apache:main Nov 1, 2023
11 checks passed
@thisisnic thisisnic removed the awaiting merge Awaiting merge label Nov 1, 2023
Copy link

After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 57c028f.

There were no benchmark performance regressions. 🎉

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

loicalleyne pushed a commit to loicalleyne/arrow that referenced this pull request Nov 13, 2023
…exit (apache#38495)

### Rationale for this change

We get lots of warning messages about unclosed connections when running tests + users get them on exit when they weren't expecting them.

### What changes are included in this PR?

A finalizer was added on exit to close the global arrow_duck_con that we cache in the global options.

### Are these changes tested?

Yes, the finalizer will run in every test that runs `to_duckb()` with the default connection.

### Are there any user-facing changes?

No.
* Closes: apache#38382

Authored-by: Dewey Dunnington <dewey@fishandwhistle.net>
Signed-off-by: Nic Crane <thisisnic@gmail.com>
assignUser pushed a commit that referenced this pull request Jan 10, 2024
…38495)

### Rationale for this change

We get lots of warning messages about unclosed connections when running tests + users get them on exit when they weren't expecting them.

### What changes are included in this PR?

A finalizer was added on exit to close the global arrow_duck_con that we cache in the global options.

### Are these changes tested?

Yes, the finalizer will run in every test that runs `to_duckb()` with the default connection.

### Are there any user-facing changes?

No.
* Closes: #38382

Authored-by: Dewey Dunnington <dewey@fishandwhistle.net>
Signed-off-by: Nic Crane <thisisnic@gmail.com>
dgreiss pushed a commit to dgreiss/arrow that referenced this pull request Feb 19, 2024
…exit (apache#38495)

### Rationale for this change

We get lots of warning messages about unclosed connections when running tests + users get them on exit when they weren't expecting them.

### What changes are included in this PR?

A finalizer was added on exit to close the global arrow_duck_con that we cache in the global options.

### Are these changes tested?

Yes, the finalizer will run in every test that runs `to_duckb()` with the default connection.

### Are there any user-facing changes?

No.
* Closes: apache#38382

Authored-by: Dewey Dunnington <dewey@fishandwhistle.net>
Signed-off-by: Nic Crane <thisisnic@gmail.com>
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.

[R] Connection is garbage-collected, use dbDisconnect() to avoid this (when using to_duckdb())
3 participants