Skip to content

MOD-7574: Output Current Thread IndexSpec Information On Crash#8051

Merged
kei-nan merged 16 commits intomasterfrom
master_jk_output_active_index_info_on_crash
Jan 20, 2026
Merged

MOD-7574: Output Current Thread IndexSpec Information On Crash#8051
kei-nan merged 16 commits intomasterfrom
master_jk_output_active_index_info_on_crash

Conversation

@kei-nan
Copy link
Collaborator

@kei-nan kei-nan commented Jan 15, 2026

Right now we only output the index name which is fine but it would be good to have index spec specific statistics for more helpful debugging of issues in the future.


Note

Adds resilient crash reporting for the current thread and refactors INFO emitters to be safe in signal/lock-sensitive contexts.

  • Output current_thread section with run_time_ns and FT.INFO-like index details via IndexSpec_AddToInfo(ctx, spec, obfuscate, skip_unsafe_ops); skips unsafe ops and supports obfuscation (new Obfuscate_Prefix) and field/path obfuscation
  • Make cursor stats INFO-safe by introducing CursorList_TryLock and returning cursor_stats{status=locked} if locks can’t be acquired
  • Always expose GC and stopwords stats for INFO (remove FTINFO_FOR_INFO_MODULES guards); wire GCContext_RenderStatsForInfo and ForkGC statsForInfoCb
  • Enhance index INFO: guard vector/tag/text memory computations and prefix/field formatting under skip_unsafe_ops; switch indexing failures metric to indexError.error_count
  • Track per-thread index runtime (SpecInfo.runningTime), initialize on CurrentThread_SetIndexSpec, and print in crash report
  • Minor: adjust module.c to set current thread spec only when relevant; small iterator API change in stopwords
  • Tests: replace brittle log substring checks with ordered extraction/validation of crash report fields, including Rust panic path

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

@kei-nan kei-nan requested review from GuyAv46 and raz-mon January 15, 2026 16:06
@kei-nan kei-nan self-assigned this Jan 15, 2026
@kei-nan kei-nan changed the title Output Current Thread IndexSpec Information On Crash MOD-7574: Output Current Thread IndexSpec Information On Crash Jan 15, 2026
@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

❌ Patch coverage is 3.38983% with 57 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.58%. Comparing base (d8a6e0e) to head (7e66d9c).
⚠️ Report is 17 commits behind head on master.

Files with missing lines Patch % Lines
src/spec.c 0.00% 37 Missing ⚠️
src/cursor.c 0.00% 14 Missing ⚠️
src/info/info_redis/info_redis.c 0.00% 3 Missing ⚠️
src/obfuscation/obfuscation_api.c 0.00% 2 Missing ⚠️
src/stopwords.c 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8051      +/-   ##
==========================================
- Coverage   83.90%   83.58%   -0.32%     
==========================================
  Files         365      364       -1     
  Lines       55168    55280     +112     
  Branches    14296    14274      -22     
==========================================
- Hits        46287    46208      -79     
- Misses       8720     8914     +194     
+ Partials      161      158       -3     
Flag Coverage Δ
flow 84.44% <3.38%> (-0.37%) ⬇️
unit 50.56% <1.69%> (-0.20%) ⬇️

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.

@kei-nan kei-nan requested a review from JoanFM January 18, 2026 07:45
Copy link

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

Copy link

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

Copy link

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

@kei-nan kei-nan force-pushed the master_jk_output_active_index_info_on_crash branch from 36f2992 to 815cc34 Compare January 18, 2026 13:21
Copy link

@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 2 potential issues.

@kei-nan kei-nan requested a review from raz-mon January 18, 2026 16:01
@kei-nan kei-nan added this pull request to the merge queue Jan 20, 2026
Merged via the queue into master with commit 6ad5523 Jan 20, 2026
44 of 45 checks passed
@kei-nan kei-nan deleted the master_jk_output_active_index_info_on_crash branch January 20, 2026 11:59
@redisearch-backport-pull-request
Copy link
Contributor

Backport failed for 8.2, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin 8.2
git worktree add -d .worktree/backport-8051-to-8.2 origin/8.2
cd .worktree/backport-8051-to-8.2
git switch --create backport-8051-to-8.2
git cherry-pick -x f1543c75e76614f95e517d6cfd5b299caa49a3be a917efc97b2b869bf09198f2997ba332b21e8f85 9087a329274ebbd481be4b7fd332ec6c60eab12a faa852c71cefbbb4b74dd3add4889c6a6e660359 3bb20364a65e873020c65a8ad51d3d528c4af9c1 92df304f4547e7e53f3c40c334a2246a791a97e8 ff44ae8d6f650f9c6d4d0c605822ff9c4436dfe5 d3af7bb49aca496dd0601a9cef66489d773f6492 33cc4d17150bedb4b91b00adbf119aff5e68efa8 815cc34da89256e100c8476a5a025102456ed298 d5c57f7a89f27c38a0a74cef2c6f9e17a426bb75 701b1229aaaa44887a2460a49f5453b0f80fff56 7ca275b8023b8253683d75e4ae40ca892d8e4001 7c6504e53485962d9e4266a363a7ef9466b792ae f600fceb73c39a69afa64ed646c8f10f09e19b36 7e66d9c4eeb78b3abc1fb76a8d81dd468b6f9de2

@redisearch-backport-pull-request
Copy link
Contributor

Backport failed for 8.4, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin 8.4
git worktree add -d .worktree/backport-8051-to-8.4 origin/8.4
cd .worktree/backport-8051-to-8.4
git switch --create backport-8051-to-8.4
git cherry-pick -x f1543c75e76614f95e517d6cfd5b299caa49a3be a917efc97b2b869bf09198f2997ba332b21e8f85 9087a329274ebbd481be4b7fd332ec6c60eab12a faa852c71cefbbb4b74dd3add4889c6a6e660359 3bb20364a65e873020c65a8ad51d3d528c4af9c1 92df304f4547e7e53f3c40c334a2246a791a97e8 ff44ae8d6f650f9c6d4d0c605822ff9c4436dfe5 d3af7bb49aca496dd0601a9cef66489d773f6492 33cc4d17150bedb4b91b00adbf119aff5e68efa8 815cc34da89256e100c8476a5a025102456ed298 d5c57f7a89f27c38a0a74cef2c6f9e17a426bb75 701b1229aaaa44887a2460a49f5453b0f80fff56 7ca275b8023b8253683d75e4ae40ca892d8e4001 7c6504e53485962d9e4266a363a7ef9466b792ae f600fceb73c39a69afa64ed646c8f10f09e19b36 7e66d9c4eeb78b3abc1fb76a8d81dd468b6f9de2

@kei-nan
Copy link
Collaborator Author

kei-nan commented Jan 20, 2026

/backport

@redisearch-backport-pull-request
Copy link
Contributor

Backport failed for 8.2, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin 8.2
git worktree add -d .worktree/backport-8051-to-8.2 origin/8.2
cd .worktree/backport-8051-to-8.2
git switch --create backport-8051-to-8.2
git cherry-pick -x 6ad5523867ea41cef7395e1001b866f4a549041f

@redisearch-backport-pull-request
Copy link
Contributor

Backport failed for 8.4, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin 8.4
git worktree add -d .worktree/backport-8051-to-8.4 origin/8.4
cd .worktree/backport-8051-to-8.4
git switch --create backport-8051-to-8.4
git cherry-pick -x 6ad5523867ea41cef7395e1001b866f4a549041f

@kei-nan
Copy link
Collaborator Author

kei-nan commented Jan 21, 2026

/backport

@redisearch-backport-pull-request
Copy link
Contributor

Backport failed for 8.2, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin 8.2
git worktree add -d .worktree/backport-8051-to-8.2 origin/8.2
cd .worktree/backport-8051-to-8.2
git switch --create backport-8051-to-8.2
git cherry-pick -x 6ad5523867ea41cef7395e1001b866f4a549041f

@redisearch-backport-pull-request
Copy link
Contributor

Backport failed for 8.4, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin 8.4
git worktree add -d .worktree/backport-8051-to-8.4 origin/8.4
cd .worktree/backport-8051-to-8.4
git switch --create backport-8051-to-8.4
git cherry-pick -x 6ad5523867ea41cef7395e1001b866f4a549041f

redisearch-backport-pull-request bot pushed a commit that referenced this pull request Jan 21, 2026
* initial commit

* remove redundant index name  since it will be added in the info function

* fix compilation

* fix code review comment + change function name

* add how long the thread was running on an index

* fixing minor bug in syn dump command

* add init call, add time to test

* use existing IndexSpec_AddToInfo, modify it a bit to ensure it is signal safe and obfuscates user data

* update test

* fix cursor stats for info function

* fix compilation and comments

* fix test + update comment

* fix code review comments

* code review fixes

* fix tests

* can't use IndexesScanner_IndexedPercent because we don't have redis module ctx

(cherry picked from commit 6ad5523)
@redisearch-backport-pull-request
Copy link
Contributor

Successfully created backport PR for 8.6:

eyalrund pushed a commit that referenced this pull request Jan 22, 2026
* initial commit

* remove redundant index name  since it will be added in the info function

* fix compilation

* fix code review comment + change function name

* add how long the thread was running on an index

* fixing minor bug in syn dump command

* add init call, add time to test

* use existing IndexSpec_AddToInfo, modify it a bit to ensure it is signal safe and obfuscates user data

* update test

* fix cursor stats for info function

* fix compilation and comments

* fix test + update comment

* fix code review comments

* code review fixes

* fix tests

* can't use IndexesScanner_IndexedPercent because we don't have redis module ctx
LukeMathWalker pushed a commit that referenced this pull request Jan 26, 2026
* initial commit

* remove redundant index name  since it will be added in the info function

* fix compilation

* fix code review comment + change function name

* add how long the thread was running on an index

* fixing minor bug in syn dump command

* add init call, add time to test

* use existing IndexSpec_AddToInfo, modify it a bit to ensure it is signal safe and obfuscates user data

* update test

* fix cursor stats for info function

* fix compilation and comments

* fix test + update comment

* fix code review comments

* code review fixes

* fix tests

* can't use IndexesScanner_IndexedPercent because we don't have redis module ctx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants