JackieTien97 opened a new pull request, #18694:
URL: https://github.com/apache/iotdb/pull/18694
## Description
A LAST query that includes devices without data partitions can initialize
the shared device schema cache with the virtual region's placeholder database,
`root.__virtual`. Subsequent exact-path queries can then fail with `No matched
database`.
Disable LAST cache initialization and updates when the operator tree runs on
`VirtualDataRegion`. This covers both aligned and non-aligned series while
preserving the empty execution branch and the existing cache policy for real
data regions.
Add regression coverage for cold and warm caches, time-filter boundaries,
repeated mixed LAST queries after clearing the schema cache, and inserts into
previously empty devices.
## Validation
- The new unit tests reproduce 8 failures on unmodified master; all 24 pass
with the fix.
- Clean reactor verification passed: 33 unit tests and 2 integration tests
on a 1 ConfigNode / 1 DataNode cluster.
- Clean full-reactor packaging passed for both English and Chinese locales
(including test compilation, with test execution skipped).
```bash
mvn clean verify -pl integration-test -am -P with-integration-tests \
-Dtest=LastQueryCacheTest,UpdateLastCacheOperatorTest,TreeDeviceSchemaCacheManagerTest
\
-Dit.test=IoTDBLastQueryVirtualRegionIT \
-DfailIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false \
-Dfailsafe.failIfNoSpecifiedTests=false
mvn clean package -DskipTests -nsu
mvn clean package -DskipTests -nsu -P with-zh-locale
```
This PR has:
- [x] been self-reviewed.
- [x] added comments explaining the intent of the change.
- [x] added unit tests covering the affected code paths.
- [x] added integration tests.
- [x] been tested in a test IoTDB cluster.
### Key changed/added classes
- `OperatorTreeGenerator`
- `LastQueryCacheTest`
- `IoTDBLastQueryVirtualRegionIT`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]