Skip to content

Comments

feat: configure LMDB db sizes in config file#12

Draft
kentbull wants to merge 3 commits intoGLEIF-IT:v1.2.8from
kentbull:configer-baser-map-size-config__gleif1.2.8__
Draft

feat: configure LMDB db sizes in config file#12
kentbull wants to merge 3 commits intoGLEIF-IT:v1.2.8from
kentbull:configer-baser-map-size-config__gleif1.2.8__

Conversation

@kentbull
Copy link
Collaborator

Adds ability to configure LMDB sizes using the bootstrap configuration file.
Also adds some INFO level logging on the config file location and database sizes set.

Adds the .mapSize property to LMDBer and the LMDBer.ConfigKey that is overridden in each subclass. This config key is used to select a subset of the overall config file to use to configure each LMDBer subclass.

For backwards compatibility the KERI_BASER_MAP_SIZE environment variable still works, yet may be deprecated in the future. Moving forward using the configuration file as the single source of truth for configuration is the recommended path.

The other GLEIF-IT/keripy specific environment variables have been removed in favor of the configuration file approach shown below.

There is both a global lmdber config block and the subclass specific blocks shown below illustrate how to configure map sizes either globally or per class.

{
  "dt": "2022-01-20T12:57:59.823350+00:00",
  "lmdber": {
    // LMDB Map Size - 50 MB
    "mapSize": 52428800
  },
  "baser": {
    // LMDB Map size - 1 GB
    "mapSize": 1073741824
  },
  "keeper": {
    // LMDB Map Size - 25 MB
    "mapSize": 26214400
  },
  "mailboxer": {
    // LMDB Map Size - 16.384 GB
    "mapSize": 17179869184
  },
  "reger": {
    // LMDB Map Size - 512 MB
    "mapSize": 536870912
  },
  "noter": {
    // LMDB Map Size - 128 MB
    "mapSize": 134217728
  },
  "wan": {
    "dt": "2022-01-20T12:57:59.823350+00:00",
    "curls": ["tcp://127.0.0.1:5632/", "http://127.0.0.1:5642/"]
  },
  "iurls": [
  ]
}

@codecov
Copy link

codecov bot commented May 19, 2025

Codecov Report

Attention: Patch coverage is 97.36842% with 3 lines in your changes missing coverage. Please review.

Project coverage is 92.24%. Comparing base (887955e) to head (5e66c3a).
Report is 6 commits behind head on v1.2.8.

Files with missing lines Patch % Lines
src/keri/db/dbing.py 93.33% 2 Missing ⚠️
src/keri/db/basing.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           v1.2.8      #12      +/-   ##
==========================================
- Coverage   92.25%   92.24%   -0.02%     
==========================================
  Files         119      119              
  Lines       45774    45717      -57     
==========================================
- Hits        42231    42171      -60     
- Misses       3543     3546       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

kentbull added 2 commits May 19, 2025 14:44
Use of a proper key word arg is more Pythonic and easier to maintain.
@kentbull kentbull marked this pull request as draft January 16, 2026 22:24
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 this pull request may close these issues.

1 participant