Skip to content

Commit 721add5

Browse files
committed
chore: development v0.2.137 - comprehensive testing complete [auto-commit]
1 parent cdafbae commit 721add5

File tree

14 files changed

+263
-139
lines changed

14 files changed

+263
-139
lines changed

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2323
- Cleaned up all TTAPI references from justfile and build scripts
2424
- Updated justfile header and recipes for UFFS
2525

26-
## [0.2.136] - 2026-01-27
26+
## [0.2.137] - 2026-01-27
2727

2828
### Added
2929
- Baseline CI validation for modernization effort
@@ -46,7 +46,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4646
### Fixed
4747
- Various MFT parsing edge cases
4848

49-
[Unreleased]: https://github.com/githubrobbi/UltraFastFileSearch/compare/v0.2.136...HEAD
50-
[0.2.136]: https://github.com/githubrobbi/UltraFastFileSearch/compare/v0.2.114...v0.2.136
49+
[Unreleased]: https://github.com/githubrobbi/UltraFastFileSearch/compare/v0.2.137...HEAD
50+
[0.2.137]: https://github.com/githubrobbi/UltraFastFileSearch/compare/v0.2.114...v0.2.137
5151
[0.2.114]: https://github.com/githubrobbi/UltraFastFileSearch/releases/tag/v0.2.114
5252

Cargo.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ exclude = [
3939
# Workspace Package Metadata (inherited by all crates)
4040
# ─────────────────────────────────────────────────────────────────────────────
4141
[workspace.package]
42-
version = "0.2.136"
42+
version = "0.2.137"
4343
edition = "2024"
4444
rust-version = "1.85"
4545
license = "MPL-2.0 OR LicenseRef-UFFS-Commercial"

LOG/2026_01_28_10_00_CHANGELOG_HEALING.md

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,17 +126,50 @@ This fails because:
126126
3. `block_on` tries to block the current thread to run the future
127127
4. But the blocking thread is still part of the tokio runtime, causing the panic
128128

129-
### Fix Applied
130-
Changed all occurrences to use `block_in_place` which properly handles this case:
129+
### First Fix Attempt (v0.2.135) - FAILED
130+
Changed all occurrences to use `block_in_place`:
131131
```rust
132132
tokio::task::block_in_place(|| {
133133
tokio::runtime::Handle::current().block_on(async { ... })
134134
})
135135
```
136136

137-
`block_in_place` temporarily moves the current thread out of the async worker pool,
138-
allowing `block_on` to work correctly.
137+
This still failed because `Handle::block_on` panics when called from within an async context,
138+
even when using `block_in_place`. The issue is that `block_in_place` only moves the current
139+
thread out of the async worker pool temporarily, but `block_on` still detects it's within
140+
a runtime context.
141+
142+
### Second Fix (v0.2.136) - SUCCESS
143+
The correct solution is to use `spawn_blocking` with **synchronous** function versions:
144+
145+
1. **Added sync function variants:**
146+
- `open_sync(drive)` - synchronous version of `open`
147+
- `read_all_sync()` - synchronous version of `read_all`
148+
- `read_with_progress_sync(callback)` - synchronous version of `read_with_progress`
149+
- `read_all_index_sync()` - synchronous version of `read_all_index`
150+
- `read_index_with_progress_sync(callback)` - synchronous version of `read_index_with_progress`
151+
152+
2. **Fixed async wrapper functions to use spawn_blocking with sync versions:**
153+
- `read_single_drive` - uses `spawn_blocking` + `open_sync` + `read_all_sync`/`read_with_progress_sync`
154+
- `read_single_drive_index` - uses `spawn_blocking` + `open_sync` + `read_all_index_sync`/`read_index_with_progress_sync`
155+
- `read_and_cache_single_drive` - uses `spawn_blocking` + `read_and_cache_single_drive_sync`
156+
- `apply_usn_updates_to_cached_index` - uses `spawn_blocking` + `apply_usn_updates_to_cached_index_sync`
157+
158+
### Why This Works
159+
- `spawn_blocking` moves the closure to a dedicated blocking thread pool
160+
- The sync functions run entirely on that blocking thread without any async/await
161+
- No `block_on` is called, so no runtime nesting occurs
162+
- Parallel drive reading is preserved via `JoinSet::spawn` - each drive gets its own blocking thread
139163

140164
### Files Modified
141-
- `crates/uffs-mft/src/reader.rs`: Fixed 5 occurrences of the pattern
165+
- `crates/uffs-mft/src/reader.rs`:
166+
- Added 5 sync function variants
167+
- Added 2 sync helper functions (`read_and_cache_single_drive_sync`, `apply_usn_updates_to_cached_index_sync`)
168+
- Fixed 4 async wrapper functions to use `spawn_blocking` with sync versions
169+
170+
### CI Result
171+
- **Status**: ✅ PASSED
172+
- **Version**: 0.2.136
173+
- **Total Time**: 485s
174+
- **Commit**: `cdafbae2e` pushed to `main`
142175

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Traditional file search tools (including `os.walk`, `FindFirstFile`, etc.) work
2121

2222
**UFFS reads the MFT directly** - once - and queries it in memory using Polars DataFrames. This is like reading the entire phonebook once instead of looking up each name individually.
2323

24-
### Benchmark Results (v0.2.136)
24+
### Benchmark Results (v0.2.137)
2525

2626
| Drive Type | Records | Time | Throughput |
2727
|------------|---------|------|------------|
@@ -33,7 +33,7 @@ Traditional file search tools (including `os.walk`, `FindFirstFile`, etc.) work
3333

3434
| Comparison | Records | Time | Notes |
3535
|------------|---------|------|-------|
36-
| **UFFS v0.2.136** | **18.7 Million** | **~142 seconds** | All disks, fast mode |
36+
| **UFFS v0.2.137** | **18.7 Million** | **~142 seconds** | All disks, fast mode |
3737
| UFFS v0.1.30 | 18.7 Million | ~315 seconds | Baseline |
3838
| Everything | 19 Million | 178 seconds | All disks |
3939
| WizFile | 6.5 Million | 299 seconds | Single HDD |

0 commit comments

Comments
 (0)