|
Ran
|
Jobs
1
|
Files
476
|
Run time
1min
|
Badge
README BADGES
|
push
github
fix(backend): make the new raster cache safe and fast under concurrent queries (#1420) * fix(backend): never hold a raster cache lock across an await The in-memory cache store held tokio locks across awaits. A future that holds one and is not polled again, e.g. in a buffered stream nobody reads, kept the cache locked for all other queries. With std locks the compiler rejects holding a guard across an await, and record_hit, clear and the LRU update are synchronous. * test(backend): bench queries through the raster cache operator * perf(backend): look up and compute raster cache tiles concurrently The raster cache operator handled one tile after another, so every miss waited for the source query of the previous one. It now reads ahead 16 tiles, like the GDAL sources, and keeps the tile order. raster_cache bench, NDVI, median of 20 runs: tiles_256 cold 14.3 -> 5.1 ms, warm 13.1 -> 6.4 ms tiles_512 cold 25.4 -> 8.7 ms, warm 25.3 -> 9.3 ms * perf(backend): store a raster cache entry once when inserts race Callers that got the same result, e.g. from the GDAL pool's shared reads, insert it at the same time. All of them passed the check for an existing entry and compressed the value, and all but one threw it away. An insert now claims its key before it compresses; a concurrent insert of the same key returns. * perf(backend): decompress cached tiles directly into their buffer Decompressing into bytes and copying them to the pixel type allocated every buffer twice and read pixels through a possibly misaligned slice. * perf(backend): load raster cache entries without copying them A hit copied the whole compressed tile on the task that polls the query, only to move it into the thread that decompresses it. That thread now shares the entry, which also keeps it from being evicted meanwhile. * feat(backend): count hits, misses and joined inserts of the raster cache (cherry picked from commit 21418f1a2) * refactor(backend)... (continued)
157 of 182 new or added lines in 3 files covered. (86.26%)
5 existing lines in 2 files now uncovered.137887 of 156687 relevant lines covered (88.0%)
536246.09 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 24 |
86.68
|
0.04% | geoengine/operators/src/cache/new_raster_cache/mod.rs |
| 1 |
73.7
|
-0.7% | geoengine/operators/src/cache/cache_tiles.rs |
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 3 |
86.68
|
0.04% | geoengine/operators/src/cache/new_raster_cache/mod.rs |
| 2 |
94.55
|
-0.99% | geoengine/services/src/quota/mod.rs |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 42983422653.1 | 476 |
88.0
|
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|