New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 764810 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 758267



Sign in to add a comment

LevelDB Tracker creates singleton in a static_library

Project Member Reported by ssid@chromium.org, Sep 13 2017

Issue description

While running debug build, leveldatabase is a static_library and it creates multiple db tracker instances instead of singleton.

I guess leveldatabase should be a shared_library?
 

Comment 1 by ssid@chromium.org, Sep 13 2017

This also causes indefinite number of block and default caches in the component builds.

Comment 2 by dskiba@chromium.org, Sep 13 2017

BTW, it should be shared_library only in component builds, and static_library otherwise. Maybe we already have support for this?
Labels: LowMemory
Status: Started (was: Untriaged)
Up for review: https://chromium-review.googlesource.com/c/chromium/src/+/671814
Project Member

Comment 5 by bugdroid1@chromium.org, Oct 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4

commit c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4
Author: Chris Mumford <cmumford@chromium.org>
Date: Mon Oct 09 17:55:08 2017

leveldb: Add leveldb_chrome::NewMemEnv.

Calling leveldb_chrome::NewMemEnv() is identical to calling leveldb::NewMemEnv.
This change is being made to facilitate these future changes:

1) Conversion of leveldatabase to a component, ( issue 764810 ).
2) Minimize caching for in-memory DBs, ( issue 761398 ).
3) Reporting memory Env use to memory-infra, (issue 750803).

This change is a subset of http://crrev.com/c/647329 (reverted) without the
changes related to (2) above.

TBR=kinuko@chromium.org,megjablon@chromium.org,nyquist@chromium.org,zea@chromium.org,mvanouwerkerk@chromium.org,nhiroki@chromium.org,phajdan.jr@chromium.org

TBRing reviewers:
kinuko@chromium.org:
  chrome/browser/extensions/api/sync_file_system/*
  chrome/browser/sync_file_system/*
  content/browser/service_worker/service_worker_database.cc
megjablon@chromium.org:
  components/data_reduction_proxy/core/browser/data_store_impl.cc
nyquist@chromium.org:
  components/leveldb_proto/*
zea@chromium.org:
  components/sync/model_impl/model_type_store_backend.cc
mvanouwerkerk@chromium.org:
  content/browser/notifications/*
nhiroki@chromium.org:
  storage/browser/fileapi/quota/quota_backend_impl_unittest.cc
phajdan.jr@chromium.org:
  PRESUBMIT.py

Bug:  764810 
Change-Id: I1fe456e5a1f8f02390648d578faf2be20148ead2
Reviewed-on: https://chromium-review.googlesource.com/703930
Commit-Queue: Chris Mumford <cmumford@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507406}
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/PRESUBMIT.py
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/chrome/browser/extensions/api/sync_file_system/sync_file_system_browsertest.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/chrome/browser/sync_file_system/drive_backend/conflict_resolver_unittest.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/chrome/browser/sync_file_system/drive_backend/leveldb_wrapper_unittest.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/chrome/browser/sync_file_system/drive_backend/list_changes_task_unittest.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer_unittest.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/chrome/browser/sync_file_system/drive_backend/metadata_database.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/chrome/browser/sync_file_system/drive_backend/metadata_database_index_on_disk_unittest.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/chrome/browser/sync_file_system/drive_backend/metadata_database_index_unittest.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/chrome/browser/sync_file_system/drive_backend/metadata_database_unittest.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/chrome/browser/sync_file_system/drive_backend/register_app_task_unittest.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer_unittest.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/chrome/browser/sync_file_system/drive_backend/sync_engine_initializer_unittest.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/chrome/browser/sync_file_system/drive_backend/sync_worker_unittest.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/chrome/browser/sync_file_system/local/local_file_change_tracker.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/chrome/browser/sync_file_system/local/local_file_change_tracker_unittest.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/chrome/browser/sync_file_system/local/local_file_sync_service_unittest.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/chrome/browser/sync_file_system/local/syncable_file_operation_runner_unittest.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/chrome/browser/sync_file_system/local/syncable_file_system_unittest.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/chrome/browser/sync_file_system/sync_file_system_service_unittest.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/components/data_reduction_proxy/core/browser/data_store_impl.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/components/leveldb/leveldb_service_impl.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/components/leveldb_proto/leveldb_database.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/components/sync/model_impl/model_type_store_backend.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/content/browser/indexed_db/indexed_db_tombstone_sweeper_unittest.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/content/browser/indexed_db/leveldb/leveldb_database.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/content/browser/notifications/notification_database.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/content/browser/service_worker/service_worker_database.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/storage/browser/fileapi/quota/quota_backend_impl_unittest.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/third_party/leveldatabase/README.chromium
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/third_party/leveldatabase/chromium_logger.h
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/third_party/leveldatabase/env_chromium_unittest.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/third_party/leveldatabase/leveldb_chrome.cc
[modify] https://crrev.com/c38afb6d0a2e3a7dca2604d35f2965a5c92e53e4/third_party/leveldatabase/leveldb_chrome.h

Project Member

Comment 6 by bugdroid1@chromium.org, Oct 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2a0c74d4a98b1267c048982a9c0f2bf66e8b8209

commit 2a0c74d4a98b1267c048982a9c0f2bf66e8b8209
Author: Chris Mumford <cmumford@chromium.org>
Date: Sat Oct 14 00:49:20 2017

leveldb: Moved from shared library to a component.

The Chromium leveldb related code now has static variables, but
was in a static library. This change moves this code into a component
to avoid having multiple copies which confuses the memory-infra
reporting statistics.

TBR=michaeln

Bug:  764810 
Change-Id: I895b553923ce06cf6788688975ec430da7f2655f
Reviewed-on: https://chromium-review.googlesource.com/671814
Commit-Queue: Chris Mumford <cmumford@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508893}
[modify] https://crrev.com/2a0c74d4a98b1267c048982a9c0f2bf66e8b8209/content/browser/fileapi/DEPS
[modify] https://crrev.com/2a0c74d4a98b1267c048982a9c0f2bf66e8b8209/storage/browser/test/sandbox_database_test_helper.cc
[modify] https://crrev.com/2a0c74d4a98b1267c048982a9c0f2bf66e8b8209/third_party/leveldatabase/BUILD.gn
[modify] https://crrev.com/2a0c74d4a98b1267c048982a9c0f2bf66e8b8209/third_party/leveldatabase/env_chromium.h
[modify] https://crrev.com/2a0c74d4a98b1267c048982a9c0f2bf66e8b8209/third_party/leveldatabase/leveldb_chrome.cc
[modify] https://crrev.com/2a0c74d4a98b1267c048982a9c0f2bf66e8b8209/third_party/leveldatabase/leveldb_chrome.h

Components: Blink>Storage
Status: Fixed (was: Started)

Sign in to add a comment