Skip to content

Block NUMERIC field creation for disk (Flex) indexes - #10389

Merged
raz-mon merged 1 commit into
masterfrom
razmon-block-numeric-flex
Jul 7, 2026
Merged

raz-mon merged 1 commit into
masterfrom
razmon-block-numeric-flex

Conversation

@raz-mon

@raz-mon raz-mon commented Jul 7, 2026 •

Copy link
Copy Markdown
Collaborator

Describe the changes in the pull request

  1. Current: FT.CREATE on a disk (Flex) index accepts NUMERIC fields, but the disk numeric index does not yet survive replication and hot restart — the RAM-resident routing/split metadata (BucketMap) is not coherently snapshotted with the SpeedB disk half.
  2. Change: Reject NUMERIC fields at schema-parse time when disk validation is enabled, using the same mechanism (and error shape) as the existing GEO/GEOSHAPE rejection: NUMERIC fields are not supported in Flex indexes. NUMERIC is also removed from the disk-supported types in the schema catch-all validation.
  3. Outcome: Creating a Flex index with a NUMERIC field now fails with a clear error instead of producing an index that cannot replicate or hot-restart correctly. The block is temporary until the numeric replication/hot-restart work lands.

Which additional issues this PR fixes

N/A

Main objects this PR modified

  1. parseFieldSpec (src/spec.c) — NUMERIC branch now calls SearchDisk_MarkUnsupportedFieldIfDiskEnabled
  2. IndexSpec_AddFieldsInternal (src/spec.c) — disk catch-all no longer lists NUMERIC as supported
  3. tests/pytests/test_flex_validation.py — test_invalid_field_type covers NUMERIC

Mark if applicable

  • This PR introduces API changes
  • This PR introduces serialization changes

Release Notes

  • This PR requires release notes
  • This PR does not require release notes

If a release note is required (bug fix / new feature / enhancement), describe the user impact of this PR in the title.

🤖 Generated with Claude Code

The disk numeric index does not yet survive replication and hot
restart (the BucketMap RAM half is not coherently snapshotted with the
SpeedB disk half), so reject NUMERIC fields at FT.CREATE time on Flex
indexes, the same way GEO and GEOSHAPE fields are rejected. Also drop
NUMERIC from the disk-supported field types in the schema catch-all
validation.

Co-Authored-By: Claude Fable 5 <[email protected]>
@sonarqubecloud

sonarqubecloud Bot commented Jul 7, 2026

Copy link
Copy Markdown

@raz-mon
raz-mon requested review from JoanFM and kei-nan July 7, 2026 20:45
@codecov

codecov Bot commented Jul 7, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 81.48%. Comparing base (05d238c) to head (7e94b3b).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/spec.c 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10389      +/-   ##
==========================================
- Coverage   81.58%   81.48%   -0.10%     
==========================================
  Files         554      555       +1     
  Lines       74756    74864     +108     
  Branches    30047    30151     +104     
==========================================
+ Hits        60991    61006      +15     
- Misses      13481    13574      +93     
  Partials      284      284              
Flag Coverage Δ
flow 84.04% <66.66%> (+<0.01%) ⬆️
unit 51.81% <66.66%> (-0.07%) ⬇️

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

☔ View full report in Codecov by Harness.
📢 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.

@raz-mon raz-mon changed the title [MOD-16337] Block NUMERIC field creation for disk (Flex) indexes Block NUMERIC field creation for disk (Flex) indexes Jul 7, 2026
@raz-mon
raz-mon enabled auto-merge July 7, 2026 21:23
@raz-mon
raz-mon added this pull request to the merge queue Jul 7, 2026
Merged via the queue into master with commit a266825 Jul 7, 2026
48 of 49 checks passed
@raz-mon
raz-mon deleted the razmon-block-numeric-flex branch July 7, 2026 22:20
raz-mon added a commit that referenced this pull request Jul 9, 2026
pull Bot pushed a commit to Mu-L/RediSearch that referenced this pull request Jul 9, 2026
raz-mon added a commit that referenced this pull request Jul 28, 2026
This reverts commit e0a546c (#10410),
re-applying the NUMERIC block for the upcoming milestone release: the
disk numeric index is not yet production-ready (replication and hot
restart do not coherently snapshot the BucketMap RAM half with the
SpeedB disk half), so reject NUMERIC fields at FT.CREATE time on Flex
indexes, the same way GEO and GEOSHAPE fields are rejected.

To be reverted again after the release tag, when numeric work resumes.

Co-authored-by: Claude Fable 5 <[email protected]>
raz-mon added a commit that referenced this pull request Jul 28, 2026
This reverts commit e0a546c (#10410),
re-applying the NUMERIC block for the upcoming milestone release: the
disk numeric index is not yet production-ready (replication and hot
restart do not coherently snapshot the BucketMap RAM half with the
SpeedB disk half), so reject NUMERIC fields at FT.CREATE time on Flex
indexes, the same way GEO and GEOSHAPE fields are rejected.

To be reverted again after the release tag, when numeric work resumes.

Co-authored-by: Claude Fable 5 <[email protected]>
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