Skip to content

Close temporary rootmulti store in channel types setup#3690

Merged
masih merged 1 commit into
mainfrom
masih/race-flake-fix
Jul 1, 2026
Merged

Close temporary rootmulti store in channel types setup#3690
masih merged 1 commit into
mainfrom
masih/race-flake-fix

Conversation

@masih

@masih masih commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Close the rootmulti store created by TestTypesTestSuite once the proof fixture has been generated. The store starts asynchronous hash logger work during commit, and leaving it open can race with t.TempDir cleanup under the race-enabled CI job, causing flaky "directory not empty" cleanup failures in channel message validation tests.

Flaked on main.

Close the rootmulti store created by TestTypesTestSuite once the
proof fixture has been generated. The store starts asynchronous hash
logger work during commit, and leaving it open can race with t.TempDir
cleanup under the race-enabled CI job, causing flaky "directory not
empty" cleanup failures in channel message validation tests.
@cursor

cursor Bot commented Jul 1, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Test-only teardown change with no production or runtime behavior impact.

Overview
Adds a deferred store.Close() in TypesTestSuite.SetupTest right after the temporary storev2rootmulti store is created for the merkle proof fixture.

The store can keep async hash-logger work running after Commit, so leaving it open let t.TempDir cleanup race under -race and produce flaky "directory not empty" failures in channel message validation tests. Closing the store before teardown stops that background work.

Reviewed by Cursor Bugbot for commit aa360c9. Bugbot is set up for automated code reviews on this repo. Configure here.

@masih masih requested a review from bdchatham July 1, 2026 17:12
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedJul 1, 2026, 5:14 PM

@seidroid seidroid Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Small, correct test-only fix: the temporary rootmulti store is fully consumed within SetupTest (only suite.proof escapes), so deferring store.Close() there properly shuts down the async hash logger before t.TempDir cleanup, resolving the documented race-CI flake.

Findings: 0 blocking | 2 non-blocking | 0 posted inline

Blockers

  • None at the file/PR level.

Non-blocking

  • Cursor's second-opinion review file (cursor-review.md) is empty — that pass produced no output.
  • Codex's review reported no material findings (it could not run tests due to sandbox network restrictions, so no test verification was performed).

@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.34%. Comparing base (344fd53) to head (aa360c9).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3690      +/-   ##
==========================================
- Coverage   59.06%   58.34%   -0.73%     
==========================================
  Files        2272     2185      -87     
  Lines      188193   178426    -9767     
==========================================
- Hits       111162   104094    -7068     
+ Misses      66979    65083    -1896     
+ Partials    10052     9249     -803     
Flag Coverage Δ
sei-chain-pr 91.07% <ø> (+36.15%) ⬆️
sei-db 70.41% <ø> (ø)
sei-db-state-db ?

Flags with carried forward coverage won't be shown. Click here to find out more.
see 117 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@masih masih enabled auto-merge July 1, 2026 17:18
@masih masih added this pull request to the merge queue Jul 1, 2026
Merged via the queue into main with commit 7529e2e Jul 1, 2026
69 of 71 checks passed
@masih masih deleted the masih/race-flake-fix branch July 1, 2026 17:55
yzang2019 added a commit that referenced this pull request Jul 2, 2026
* main:
  Add chain_id label to OTel metrics (#3692)
  Close temporary rootmulti store in channel types setup (#3690)
  Update changelog in prep to cut 6.6 RC1 (#3685)
  Pin priority-fee assertions to stable heads (#3680)
  Retry npm install for disable wasm integration test (#3674)
  State Store: Compact pruned key range after each prune (#3675)
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.

3 participants