Skip to content

feat: auto-fallback to SQLite when embedded SeekDB is unavailable#993

Open
knqiufan wants to merge 2 commits into
oceanbase:mainfrom
knqiufan:feat/cross-platform-storage-default-fallback
Open

feat: auto-fallback to SQLite when embedded SeekDB is unavailable#993
knqiufan wants to merge 2 commits into
oceanbase:mainfrom
knqiufan:feat/cross-platform-storage-default-fallback

Conversation

@knqiufan

@knqiufan knqiufan commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add powermem.platform_defaults with choose_default_database_provider() to centralize zero-config storage selection.
  • When DATABASE_PROVIDER and OCEANBASE_HOST are unset:
    • Non-Linux platforms default to SQLite (./data/powermem_dev.db).
    • Linux probes embedded SeekDB (pyobvector, pyseekdb, pylibseekdb); uses OceanBase embedded mode when available, otherwise falls back to SQLite with a WARNING.
  • Wire the helper into config loading, Memory/CLI setup, OceanBase embedded init, and server startup.
  • Expose storage_capabilities on /api/v1/system/status so clients can see SQLite limitations (no Graph Store, sub_stores, sparse vectors, SkillStore).
  • Update .env.example / .env.example.full comments to document platform-aware defaults.

Closes #992

Test plan

  • pytest tests/unit/test_storage_default_provider.py
  • pytest tests/unit/test_seekdb_default_storage.py
  • Windows zero-config: powermem-server starts, memory APIs return 200 (not 503)
  • Linux + powermem[seekdb]: zero-config still uses embedded SeekDB at ./seekdb_data
  • Explicit DATABASE_PROVIDER=oceanbase on non-Linux still surfaces a clear validation error (no silent override)

knqiufan added 2 commits June 9, 2026 02:07
Centralize platform-aware storage default selection so zero-config startup uses embedded SeekDB only when available, and falls back to SQLite otherwise.

Expose memory service readiness and SQLite capability limitations through server status and the dashboard.

Closes oceanbase#992
@knqiufan knqiufan changed the title fix(storage): fall back to sqlite when seekdb is unavailable feat: auto-fallback to SQLite when embedded SeekDB is unavailable Jun 8, 2026
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.

[Enhancement]: Auto-fallback to SQLite for zero-config startup when embedded seekdb is unavailable (non-Linux / missing pylibseekdb)

1 participant