Skip to content

[MOD-13847] Don't error if a numeric index hasn't been initialized yet#8460

Merged
LukeMathWalker merged 1 commit intomasterfrom
numeric-range-tree-2c-debug-empty
Feb 25, 2026
Merged

[MOD-13847] Don't error if a numeric index hasn't been initialized yet#8460
LukeMathWalker merged 1 commit intomasterfrom
numeric-range-tree-2c-debug-empty

Conversation

@LukeMathWalker
Copy link
Copy Markdown
Collaborator

@LukeMathWalker LukeMathWalker commented Feb 24, 2026

Describe the changes in the pull request

In #8305, I thought I could get away with returning an error for a numeric index that hadn't been initialised yet, but unfortunately it won't fly.
Creating numeric indexes eagerly would result in increased memory usage, and returning an error after the user has correctly issued a CREATE INDEX command would be confusing.

So, back to the original: return an empty response with the proper keys. I structured the code to minimise the risk of divergence between empty and non-empty keys, with tests to ensure they have the correct structure.

Which additional issues this PR fixes

  1. MOD-...
  2. #...

Main objects this PR modified

  1. ...

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.


Note

Low Risk
Small, localized change to debug/diagnostics output handling; main risk is subtle response-format regressions, covered by added snapshot tests.

Overview
Fixes FT.DEBUG numeric index introspection to gracefully handle uninitialized numeric indexes.

The Rust debug helpers (debug_summary, debug_dump_index, debug_dump_tree) now accept Option<&NumericRangeTree> and return zero/empty responses when absent, while the C/Rust FFI wrappers and generated header docs explicitly allow t == NULL instead of asserting. Integration snapshots add coverage for the None case and verify the empty responses keep the same key structure as the default tree outputs.

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

@jit-ci
Copy link
Copy Markdown

jit-ci bot commented Feb 24, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.52%. Comparing base (011a3a7) to head (2f85461).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8460   +/-   ##
=======================================
  Coverage   82.51%   82.52%           
=======================================
  Files         421      421           
  Lines       60938    60948   +10     
  Branches    18808    18818   +10     
=======================================
+ Hits        50284    50298   +14     
+ Misses      10463    10459    -4     
  Partials      191      191           
Flag Coverage Δ
flow 83.99% <ø> (+<0.01%) ⬆️
unit 51.75% <100.00%> (+<0.01%) ⬆️

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.

@LukeMathWalker LukeMathWalker force-pushed the numeric-range-tree-2c-debug-empty branch from 7b89449 to 2f85461 Compare February 24, 2026 16:42
@sonarqubecloud
Copy link
Copy Markdown

@LukeMathWalker LukeMathWalker added this pull request to the merge queue Feb 25, 2026
Merged via the queue into master with commit 2e8add9 Feb 25, 2026
50 checks passed
@LukeMathWalker LukeMathWalker deleted the numeric-range-tree-2c-debug-empty branch February 25, 2026 08:18
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