Skip to content

[8.4] Remove non-TEXT fields from the spec's keys dictionary - [MOD-13150]#7887

Merged
GuyAv46 merged 2 commits into8.4from
backport-7871-to-8.4
Dec 28, 2025
Merged

[8.4] Remove non-TEXT fields from the spec's keys dictionary - [MOD-13150]#7887
GuyAv46 merged 2 commits into8.4from
backport-7871-to-8.4

Conversation

@GuyAv46
Copy link
Collaborator

@GuyAv46 GuyAv46 commented Dec 24, 2025

Manual backport of #7871


Note

Shifts non-TEXT index structures from the global spec->keysDict to per-field ownership, simplifying lifecycle and reducing keysDict scope to TEXT terms only.

  • Introduces field-based handles: TagIndex_Open(fs), openNumericOrGeoIndex(spec, fs, ...), OpenGeometryIndex(fs, ...), openVectorIndex(fs, ...); removes key-formatted open paths
  • Extends FieldSpec with tagIndex, tree (numeric/geo), geometryIndex, and vecSimIndex; ensures proper freeing in FieldSpec_Cleanup
  • Reworks consumers (GC, iterators, query, indexer, info/debug commands) to use field-based APIs; updates memory/stat collection accordingly
  • Adds "legacy" helpers for drop-by-key paths (IndexSpec_LegacyGetFormattedKey, Redis_LegacyDeleteKey, HiddenString_LegacyDropFromKeySpace) used only for cleanup of legacy keys
  • Adjusts tests and debug/info outputs (e.g., SPEC_INVIDXES_INFO) to reflect that non-TEXT entries are no longer stored in keysDict

Written by Cursor Bugbot for commit 3add6f9. This will update automatically on new commits. Configure here.

…7871)

* move fields outside keysDict

* remove dead defs

* fix memory consumption test helper

* test fixes

* wip

* reverting unnecessary changes

* reverting unnecessary changes

* fix memory calculations

* fix memory calculations

* small improvement

* tidy ups

* review fixes

(cherry picked from commit 5668dd1)
@GuyAv46 GuyAv46 requested a review from ofiryanai December 24, 2025 14:43
@codecov
Copy link

codecov bot commented Dec 24, 2025

Codecov Report

❌ Patch coverage is 97.05882% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.00%. Comparing base (dd8f901) to head (3add6f9).
⚠️ Report is 8 commits behind head on 8.4.

Files with missing lines Patch % Lines
src/spec.c 85.71% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              8.4    #7887      +/-   ##
==========================================
- Coverage   86.05%   86.00%   -0.05%     
==========================================
  Files         331      331              
  Lines       53368    53298      -70     
  Branches    11998    11998              
==========================================
- Hits        45925    45839      -86     
- Misses       7276     7292      +16     
  Partials      167      167              
Flag Coverage Δ
flow 84.61% <95.58%> (-0.17%) ⬇️
unit 52.29% <36.76%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@GuyAv46 GuyAv46 enabled auto-merge December 24, 2025 16:25
Copy link
Contributor

@ofiryanai ofiryanai left a comment

Choose a reason for hiding this comment

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

LGTM

@GuyAv46 GuyAv46 added this pull request to the merge queue Dec 28, 2025
Merged via the queue into 8.4 with commit 65ca20f Dec 28, 2025
32 checks passed
@GuyAv46 GuyAv46 deleted the backport-7871-to-8.4 branch December 28, 2025 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants