Skip to content

Conversation

@Kbhat1
Copy link
Contributor

@Kbhat1 Kbhat1 commented Nov 24, 2025

Describe your changes and provide context

  • Fixes flaky test panic in pebbledb iterator w/ checks after SeekLT() operations before accessing Key() or Value()
  • Previously SeekLT() failed and invalidated the iterator but code still accesses the iterator and potentially read garbage memory data
  • reordered Close() to wait for the background snapshot goroutine to finish before closing streamHandler preventing race where the goroutine accesses a nil streamHandler.

Testing performed to validate your change

  • Verified testing
  • Running it to repro flakiness

@github-actions
Copy link

github-actions bot commented Nov 24, 2025

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedNov 28, 2025, 7:11 PM

@codecov
Copy link

codecov bot commented Nov 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 39.88%. Comparing base (eed339b) to head (216ee58).
⚠️ Report is 523 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2571       +/-   ##
===========================================
- Coverage   43.09%   39.88%    -3.22%     
===========================================
  Files        1590       15     -1575     
  Lines      137470     1389   -136081     
===========================================
- Hits        59247      554    -58693     
+ Misses      72736      786    -71950     
+ Partials     5487       49     -5438     
Flag Coverage Δ
sei-chain ?
sei-cosmos ?
sei-db ?
sei-tendermint ?
sei-wasmd ?
sei-wasmvm 39.88% <ø> (+0.22%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1575 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.

@codecov
Copy link

codecov bot commented Nov 24, 2025

Codecov Report

❌ Patch coverage is 10.22727% with 79 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.24%. Comparing base (b01060b) to head (316d350).

Files with missing lines Patch % Lines
sei-db/ss/test/storage_test_suite.go 0.00% 75 Missing ⚠️
sei-db/ss/pebbledb/iterator.go 33.33% 2 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2571      +/-   ##
==========================================
- Coverage   44.19%   43.24%   -0.96%     
==========================================
  Files        1793     1447     -346     
  Lines      149498   115153   -34345     
==========================================
- Hits        66066    49793   -16273     
+ Misses      77549    61035   -16514     
+ Partials     5883     4325    -1558     
Flag Coverage Δ
sei-chain 42.36% <ø> (ø)
sei-cosmos 40.15% <ø> (ø)
sei-db 44.74% <10.22%> (-0.19%) ⬇️
sei-ibc-go 56.39% <ø> (ø)
sei-tendermint ?
sei-wasmd 42.59% <ø> (ø)
sei-wasmvm 39.88% <ø> (ø)

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

Files with missing lines Coverage Δ
sei-db/sc/memiavl/db.go 63.14% <100.00%> (-0.07%) ⬇️
sei-db/ss/pebbledb/iterator.go 52.72% <33.33%> (-1.48%) ⬇️
sei-db/ss/test/storage_test_suite.go 0.00% <0.00%> (ø)

... and 348 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.

@Kbhat1 Kbhat1 requested review from masih and yzang2019 November 24, 2025 20:51
@yzang2019
Copy link
Contributor

Shall we add a specific failure scenario (instead of flaky test) to make sure iterator will return correctly when hitting this scenario in the future?

@Kbhat1 Kbhat1 enabled auto-merge (squash) November 24, 2025 21:04
@Kbhat1 Kbhat1 disabled auto-merge November 28, 2025 18:40
@Kbhat1 Kbhat1 enabled auto-merge (squash) November 28, 2025 19:11
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.

5 participants