You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-3Lines changed: 15 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,10 +47,22 @@ SharpCoreDB has been successfully transformed from embedded database into a **ne
47
47
48
48
**See documentation:**`docs/INDEX.md`
49
49
50
-
### ⚠️ Known Deferred Limitation
50
+
### ✅ Previously Known Limitation — Resolved
51
51
52
-
-`SingleFileDatabase.ExecuteCompiled` with parameterized plans can still hang during disposal in specific shutdown paths.
53
-
- Current status: mitigated with safer shutdown ordering; full resolution requires async disposal refactor (`IAsyncDisposable`) in single-file storage provider lifecycle.
52
+
-`SingleFileDatabase.ExecuteCompiled` with parameterized plans previously hung due to an infinite loop in the SQL lexer (`?` parameter placeholder). Fixed: FastSqlLexer, EnhancedSqlParser, QueryCompiler. Full `IAsyncDisposable` lifecycle also implemented.
53
+
54
+
### 📈 Performance Improvements (March 14, 2026)
55
+
56
+
After the `IAsyncDisposable` lifecycle refactor and SQL lexer/parser fixes, benchmarks show **zero regressions** and significant gains:
57
+
58
+
| Benchmark | Before | After | Improvement |
59
+
|-----------|-------:|------:|:------------|
60
+
| Single-File SELECT (Unencrypted) | 4.01 ms |**1.81 ms**|**55% faster**|
61
+
| Single-File SELECT (Encrypted) | 2.74 ms |**1.57 ms**|**43% faster**|
62
+
| AppendOnly UPDATE | 143.42 ms |**70.36 ms**|**51% faster**|
63
+
| Dir Encrypted UPDATE | 9.16 ms |**7.91 ms**|**14% faster**|
64
+
65
+
All other benchmarks (25 total) remain stable. Full results: [`docs/BENCHMARK_RESULTS.md`](docs/BENCHMARK_RESULTS.md)
Copy file name to clipboardExpand all lines: docs/FEATURE_MATRIX.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,10 +21,13 @@
21
21
22
22
---
23
23
24
-
## ⚠️ Known Deferred Limitation
24
+
## ✅ Previously Deferred Limitation — Resolved
25
25
26
-
-`SingleFileDatabase.ExecuteCompiled` with parameterized plans can still hang in specific disposal/shutdown paths.
27
-
- Mitigation is in place (safer disposal ordering), but full resolution requires async disposal refactoring (`IAsyncDisposable`) in single-file storage internals.
26
+
-`SingleFileDatabase.ExecuteCompiled` with parameterized plans previously hung due to an infinite loop in the SQL lexer when encountering `?` parameter placeholders.
27
+
-**Root cause:**`FastSqlLexer.NextToken()` did not advance the position on unrecognized characters, causing `Tokenize()` to loop forever.
28
+
-**Fixed in:** FastSqlLexer (parameter token support + safety advance), EnhancedSqlParser (? placeholder parsing), QueryCompiler (parameterized plan compilation). Full `IAsyncDisposable` lifecycle also implemented across all storage providers.
29
+
-**Test coverage:**`SingleFileDatabase_ExecuteCompiled_WithParameterizedPlan_ReturnsRows` passes in ~1 second.
30
+
-**Performance impact:** Single-File SELECT **43-55% faster**, AppendOnly UPDATE **51% faster**, zero regressions across all 25 benchmarks (March 14, 2026). See [`docs/BENCHMARK_RESULTS.md`](BENCHMARK_RESULTS.md).
Copy file name to clipboardExpand all lines: docs/PROJECT_STATUS.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
1
# SharpCoreDB Project Status
2
2
3
3
**Version:** 1.5.0
4
-
**Status:**⚠️ Production Ready with One Deferred Engine Limitation
4
+
**Status:**✅ Production Ready — All Known Limitations Resolved
5
5
**Last Updated:** March 14, 2026
6
6
7
7
## 🎯 Current Status
8
8
9
-
> **Implementation audit (March 14, 2026):** Engine limitation remediation pass completed for parser/runtime behavior. Five previously documented gaps are now implemented and validated. One disposal deadlock scenario remains deferred (see below).
9
+
> **Implementation audit (March 14, 2026):** Engine limitation remediation pass completed for parser/runtime behavior. All previously documented gaps are now implemented and validated, including the parameterized `ExecuteCompiled` hang (root cause: infinite loop in `FastSqlLexer` on `?` placeholders).
10
10
11
11
SharpCoreDB is a **production-ready, high-performance embedded AND networked database** for .NET 10 with enterprise-scale distributed capabilities, server mode, and advanced GraphRAG analytics.
12
12
@@ -18,10 +18,10 @@ SharpCoreDB is a **production-ready, high-performance embedded AND networked dat
18
18
- Enhanced SQL parser trailing-token validation to reliably set `HasErrors` on malformed trailing content.
19
19
- LINQ translator support for `ExpressionType.Convert`/`ConvertChecked` in enum-related comparisons.
20
20
21
-
### ⚠️ Deferred Limitation (Tracked)
21
+
### ✅ Previously Deferred Limitation — Resolved
22
22
23
-
-`SingleFileDatabase.ExecuteCompiled` with parameterized plans can still hang in specific disposal/shutdown paths.
24
-
-Mitigations were applied (safer disposal ordering), but a full fix requires async disposal lifecycle refactoring (`IAsyncDisposable`) in single-file storage provider internals.
23
+
-`SingleFileDatabase.ExecuteCompiled` with parameterized plans previously hung due to an infinite loop in `FastSqlLexer.NextToken()` — the `?` character was not recognized, and the default case did not advance the read position.
24
+
-**Fixed:**`FastSqlLexer` (parameter token + safety advance), `EnhancedSqlParser` (`?` placeholder parsing), `QueryCompiler` (parameterized plan compilation). `IAsyncDisposable` lifecycle also implemented across all storage providers.
-**Root cause found:**`FastSqlLexer.NextToken()` had an infinite loop — the `?` parameter placeholder character did not match any case in the switch expression, and the default case returned an `Unknown` token without advancing `position`. Since `Tokenize()` discards `Unknown` tokens and re-reads, this caused an infinite loop.
34
+
-**Fix applied (3 files):**
35
+
-`FastSqlLexer.cs`: Added `Parameter` token type for `?`, added `AdvanceUnknown()` safety method for default case.
36
+
-`EnhancedSqlParser.Expressions.cs`: Added `?` placeholder handling in `ParseLiteral()`.
37
+
-`QueryCompiler.cs`: Allow null `whereFilter` when parameter placeholders are present (parameterized queries use `BindPreparedSql` at execution time).
38
+
- Additionally, `IAsyncDisposable` was implemented across all storage providers with proper disposal ordering.
39
+
- Test `SingleFileDatabase_ExecuteCompiled_WithParameterizedPlan_ReturnsRows` now passes in ~1 second.
37
40
38
41
## Validation Snapshot
39
42
@@ -43,6 +46,6 @@ This document tracks test-related runtime issues that can affect reliability, pe
43
46
44
47
## Follow-up Work
45
48
46
-
- Implement async disposal lifecycle for single-file provider.
47
-
- Re-enable and stabilize the previously skipped parameterized `ExecuteCompiled` single-file test.
49
+
-✅ ~~Implement async disposal lifecycle for single-file provider.~~ Done — `IAsyncDisposable` implemented across all storage providers.
50
+
-✅ ~~Re-enable and stabilize the previously skipped parameterized `ExecuteCompiled` single-file test.~~ Done — test passes in ~1 second.
48
51
- Keep this document synchronized with `docs/PROJECT_STATUS.md` after each remediation pass.
0 commit comments