Skip to content

[Data-11] Cache Attach fix#2835

Open
Zhimin-arya wants to merge 3 commits into
developfrom
Zhimin-arya/data-11_fix_HANA_attach
Open

[Data-11] Cache Attach fix#2835
Zhimin-arya wants to merge 3 commits into
developfrom
Zhimin-arya/data-11_fix_HANA_attach

Conversation

@Zhimin-arya

@Zhimin-arya Zhimin-arya commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Merge Checklist

  1. set createDbFileIfMissing=true when attach HANA to duckdb cache, set the cache name as ${database_code}_cache.db
  2. Update search_embedding flow for hana and create_cachedb_hana_plugin with new cache name
  3. Update hybrid search on hana accordingly
Screen.Recording.2026-07-02.at.15.15.29.mov
  • Automated Tests (Jasmine integration tests, Unit tests, and/or Performance tests)
  • Updated Manual tests / Demo Config
  • Documentation (Application guide, Admin guide, Markdown, Readme and/or Wiki)
  • Verified that local development environment is working with latest changes (integrated with latest develop branch)
  • following best practices in code review doc

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Trex server startup cache attachment so cache databases can be attached even when the underlying .db file doesn’t exist yet (allowing DuckDB to create it on first attach), addressing cache attach failures at startup.

Changes:

  • Remove the previous startup logic that enumerated HANA datasets and attempted to attach their caches explicitly.
  • Pass createDbFileIfMissing: true when attaching portal-derived cache_id databases during startup.

try {
await ensureCacheAttached(ds.code, {
cacheDir: "/usr/src/data/cache",
await ensureCacheAttached(`${ds.code}_cache`, {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is _cache added for HANA datasets?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because if cache_id == database_code trex routes to directly HANA connection, but in search_embedding we need hana cache in duckdb cache. So append _cache makes trex to connect cache instead.

@Zhimin-arya Zhimin-arya linked an issue Jul 3, 2026 that may be closed by this pull request
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.

Search embedding for HANA failed

4 participants