Skip to content

Pass case search table name as storage cache identifier (USH-6370 fix)#1770

Open
MartinRiese wants to merge 6 commits intomasterfrom
riese/fix_cache_collision
Open

Pass case search table name as storage cache identifier (USH-6370 fix)#1770
MartinRiese wants to merge 6 commits intomasterfrom
riese/fix_cache_collision

Conversation

@MartinRiese
Copy link
Copy Markdown
Contributor

@MartinRiese MartinRiese commented Apr 16, 2026

Product Description

Pass caseSearchTableName to CaseInstanceTreeElement so case search results cache under "casedb:<table_hash>" instead of plain "casedb". Prevents RecordObjectCache key collision with the user's casedb instance when both share a QueryContext during nodeset evaluation.

Technical Summary

https://dimagi.atlassian.net/browse/USH-6370

Safety Assurance

Safety story

The change only effects a cache key. The code that populates the cache is unchanged.
The test script to reproduce the issue ran through multiple times without reproduction after this fix was deployed to staging.

Automated test coverage

None

QA Plan

Special deploy instructions

This PR requires these changes in commcare-core

Rollback instructions

  • This PR can be reverted after deploy with no further considerations.

Review

  • The set of people pinged as reviewers is appropriate for the level of risk of the change.

Pass caseSearchTableName to CaseInstanceTreeElement so case search
results cache under "casedb:<table_hash>" instead of plain "casedb".
Prevents RecordObjectCache key collision with the user's casedb
instance when both share a QueryContext during nodeset evaluation.

Includes commcare-core submodule bump with the new constructor.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.10%. Comparing base (77be345) to head (b3b6dd8).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1770      +/-   ##
============================================
- Coverage     70.17%   70.10%   -0.07%     
+ Complexity     2032     2030       -2     
============================================
  Files           257      257              
  Lines          8009     8011       +2     
  Branches        763      764       +1     
============================================
- Hits           5620     5616       -4     
- Misses         2106     2112       +6     
  Partials        283      283              

☔ 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.

@MartinRiese MartinRiese requested a review from shubham1g5 April 16, 2026 17:02
@MartinRiese MartinRiese marked this pull request as ready for review April 17, 2026 13:34
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