Skip to content

Enable building JAR with support for parallel IO #13510

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mirgee
Copy link

@mirgee mirgee commented Apr 1, 2025

This change set intends to introduce the minimal set of modifications required to enable building the Java bindings with coroutine and io_uring support simply by running

ROCKSDB_USE_IO_URING=1 USE_COROUTINES=1 make rocksdbjavastatic

To achieve this without a breaking change, Folly and it's dependencies are linked in statically. The drawback of this is a slight increase in the size of the resulting library.

The purpose of this change is to allow users of the Java bindings to benefit from the capability of the MultiGet implementation to issue IO requests for multiple data blocks in parallel. We would like for this feature to be part of a release, and so we need

  1. confirmation that this is desirable or at least admissible, and
  2. either cooperation from the party making the JAR release (it's not part of the public CI in this repo) to set ROCKSDB_USE_IO_URING=1 and USE_COROUTINES=1, or agree to make building the JAR with coroutine support the default behavior.

In case building and publishing the artifact with coroutine support by default is undesirable for some reason (maybe the dynamic dependency on liburing) would it be possible to perhaps (temporarily) release two versions of the artifact - with and without coroutine support, or find some other solution? We want to use this feature in our Java project, and we would like to avoid building and publishing our own artifacts for this reason.

Another question related to this PR I would like to ask is about the purpose of the RocksDbIOUringEnable(). I see that the changelog says:

Add an interface RocksDbIOUringEnable() that, if defined by the user, will allow them to enable/disable the use of IO uring by RocksDB.

I assume that although read_options.async_io already performs the same role, there are situations where there is a need to disable io_uring where read_options are not available. Since the choice to use io_uring or not is already exposed to the user via read_options.async_io, is it safe for the wrappers implementation of RocksDbIOUringEnable() to just always return true, or does it have to e.g. do some check whether io_uring is available on the OS (just once to avoid incurring latency), or is it expected to do something else?

@facebook-github-bot
Copy link
Contributor

Hi @mirgee!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

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.

2 participants