mojo LevelDB service should not create a separate leveldb environment per db connection |
||
Issue descriptionCurrently the mojo LevelDB service creates a new leveldb environment for each connection made to a database. This has several problems: - each env will have its own background thread, causing potentially many background threads all trying to run compaction at the same time etc - MojoEnv derives from ChromiumEnv, yet ChromiumEnv doesn't support being destructed. This means that (if we fix the mojo leveldb service to not destroy it's envs) we'd leak an env instance for every database connection - something about file locks not working properly, but probably that should (or maybe is already) solved at the level of the mojo file service? Not sure how to best solve this though. Currently when opening a connection to a database you specify the filesystem.mojom.Directory you want the files to be created in, and the various env methods need to know what this directory is to be able to interpret the paths it is given.
,
Apr 13 2017
,
Apr 24 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9a16c13f62099154b115bf2e3464efb075b9d3f9 commit 9a16c13f62099154b115bf2e3464efb075b9d3f9 Author: mek <mek@chromium.org> Date: Mon Apr 24 22:04:04 2017 Use correct task traits for mojo leveldb env background tasks. These background tasks can do file operations, which might involve blocking using base::WaitableEvents as well as other blocking in leveldb code itself. BUG= 697612 Review-Url: https://codereview.chromium.org/2838663002 Cr-Commit-Position: refs/heads/master@{#466786} [modify] https://crrev.com/9a16c13f62099154b115bf2e3464efb075b9d3f9/components/leveldb/env_mojo.cc |
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Apr 13 2017