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

export stats_persist_period_sec option and rocksdb_env_set_background_threads #447

Closed
ailisp opened this issue Jul 20, 2020 · 9 comments · Fixed by #448
Closed

export stats_persist_period_sec option and rocksdb_env_set_background_threads #447

ailisp opened this issue Jul 20, 2020 · 9 comments · Fixed by #448

Comments

@ailisp
Copy link

ailisp commented Jul 20, 2020

These are needed if user want to disable all threads in rocksdb. Only set set_max_background_jobs, set_max_background_compactions, set_max_background_flushes to 0 will still leave 4 additional threads. By this in C++ rocksdb it's possible to disable all threads by (tested in lldb):

  options.max_background_jobs = 0; // already have in rust-rocksdb, master
  options.max_background_compactions = 0;  // already have in rust-rocksdb 0.14
  options.max_background_flushes = 0;  // already have in rust-rocksdb 0.14
  options.stats_dump_period_sec = 0;  // already have in rust-rocksdb 0.14
  options.stats_persist_period_sec = 0; // **need export**
  DB* db = nullptr;
  Status s = DB::Open(options, kDBPath, &db);
  Env::Default()->SetBackgroundThreads(0, Env::Priority::BOTTOM); // **need export**
  Env::Default()->SetBackgroundThreads(0, Env::Priority::LOW);
  Env::Default()->SetBackgroundThreads(0, Env::Priority::HIGH);
@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 150.0 DAI (150.0 USD @ $1.0/DAI) attached to it as part of the https://github.com/near/ fund.

@gitcoinbot
Copy link

gitcoinbot commented Jul 20, 2020

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 1 month from now.
Please review their action plans below:

1) developerfred has been approved to start work.

I would love to work on this project, I have experience with Rust.

Learn more on the Gitcoin Issue Details page.

BusyJay pushed a commit to BusyJay/rust-rocksdb that referenced this issue Jul 21, 2020
Signed-off-by: koushiro <koushiro.cqx@gmail.com>
BusyJay pushed a commit to BusyJay/rust-rocksdb that referenced this issue Jul 23, 2020
Signed-off-by: koushiro <koushiro.cqx@gmail.com>
developerfred added a commit to developerfred/rust-rocksdb that referenced this issue Jul 23, 2020
…cksdb#447

- [x] add test disable all threads on get_with_cache_and_bulkload_test
- [x] add test for stats_persist_period_sec
@gitcoinbot
Copy link

@developerfred Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • reminder (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

facebook-github-bot pushed a commit to facebook/rocksdb that referenced this issue Jul 28, 2020
Summary:
fixed
 - rust-rocksdb/rust-rocksdb#447
 -  rust-rocksdb/rust-rocksdb#448

Pull Request resolved: #7168

Reviewed By: cheng-chang

Differential Revision: D22736013

Pulled By: ajkr

fbshipit-source-id: fdd784aa75d26a367b9108b05ffdd94a2ae117d3
@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 150.0 DAI (150.0 USD @ $1.0/DAI) has been submitted by:

  1. @developerfred

@nearmax please take a look at the submitted work:


@developerfred
Copy link
Contributor

@ailisp and @nearmax done the functions have already been published in the master on Facebook/rocksdb

@ailisp
Copy link
Author

ailisp commented Jul 29, 2020

@ailisp and @nearmax done the functions have already been published in the master on Facebook/rocksdb

Cool! Can you export it in rust-rocksdb (it's okay to submit your fork of rust-rocksdb, bump rocksdb version here: https://github.com/rust-rocksdb/rust-rocksdb/tree/master/librocksdb-sys to include your commit to Facebook/rocksdb)

@developerfred
Copy link
Contributor

developerfred commented Jul 29, 2020

@ailisp ok, I will do!
#448 (comment)

@ailisp
Copy link
Author

ailisp commented Aug 6, 2020

@nearmax @developerfred 's work is fully as we expected, there was a problem on my test (must wait a few seconds so rocksdb shutdown threads) we can release the bounty

@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 150.0 DAI (150.0 USD @ $1.0/DAI) attached to this issue has been approved & issued to @developerfred.

codingrhythm pushed a commit to SafetyCulture/rocksdb that referenced this issue Mar 5, 2021
Summary:
fixed
 - rust-rocksdb/rust-rocksdb#447
 -  rust-rocksdb/rust-rocksdb#448

Pull Request resolved: facebook#7168

Reviewed By: cheng-chang

Differential Revision: D22736013

Pulled By: ajkr

fbshipit-source-id: fdd784aa75d26a367b9108b05ffdd94a2ae117d3
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 a pull request may close this issue.

3 participants