Commit 9f3f256
Make the sorted-page cost guard survive a slow runner
The v5.1.0 tag build failed on the Windows runner and nowhere else, on this
guard: fat 14.5 ms against lean 2.7 ms, a 5.4x ratio through a 4x threshold,
with the index-ordered sort in place and working. `release.yml` gates on Build
succeeding, so the Maven Central publish was skipped and 5.1.0 never shipped.
The threshold was not the problem, the shape was. The guard compares a sorted
page over lean documents against one over fat documents at the same row count,
so that the index walk - identical in both - cancels and only the decode
differs. But a page of 20 fat documents costs more to return than a page of 20
lean ones no matter how the order was decided, and that difference is the floor
of the ratio. On this machine it is noise; on the Windows runner it was most of
the measurement.
Asking for one row instead of twenty shrinks that floor twentyfold while leaving
the discarded-row decode at full size. Measured here: 0.56x with the
index-ordered sort against 85x without it, so a 3x threshold now sits five times
clear of a passing run rather than seven-tenths of the way to a failing one.
Test-only. Also dates the 5.1.0 changelog entry correctly.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent ab91339 commit 9f3f256
2 files changed
Lines changed: 18 additions & 11 deletions
File tree
- nitrite-mvstore-adapter/src/test/java/org/dizitart/no2/integration/collection
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
Lines changed: 17 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
75 | | - | |
76 | | - | |
77 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
78 | 79 | | |
79 | | - | |
80 | | - | |
81 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
82 | 89 | | |
83 | 90 | | |
84 | 91 | | |
85 | 92 | | |
86 | | - | |
| 93 | + | |
87 | 94 | | |
88 | 95 | | |
89 | 96 | | |
90 | | - | |
| 97 | + | |
91 | 98 | | |
92 | 99 | | |
93 | 100 | | |
| |||
106 | 113 | | |
107 | 114 | | |
108 | 115 | | |
109 | | - | |
| 116 | + | |
110 | 117 | | |
111 | 118 | | |
112 | 119 | | |
| |||
0 commit comments