Skip to content

[To dev/1.3]Fix fast last empty cache handling#17743

Open
Caideyipi wants to merge 1 commit into
dev/1.3from
fix-fast-last-empty-cache-placeholder-1.3
Open

[To dev/1.3]Fix fast last empty cache handling#17743
Caideyipi wants to merge 1 commit into
dev/1.3from
fix-fast-last-empty-cache-placeholder-1.3

Conversation

@Caideyipi
Copy link
Copy Markdown
Collaborator

@Caideyipi Caideyipi commented May 22, 2026

Description

Motivation

In 1.3, fast last query may use DeviceLastCache.EMPTY_TIME_VALUE_PAIR to represent a cache hit whose last value is
empty.

The prefix-path fast last query path already skips this empty cache entry, but
executeFastLastDataQueryForOneDeviceV2 only checked whether timeValuePair.getValue() was null. As a result,
DeviceLastCache.EMPTY_TIME_VALUE_PAIR could be handled as a normal cached value.

Modification

This PR updates the one-device fast last query cache-hit path to treat DeviceLastCache.EMPTY_TIME_VALUE_PAIR as an
empty last-cache entry.

Tests

mvn -pl iotdb-core/datanode -am -DskipTests compile
Key changed/added classes in this PR
  • ClientRPCServiceImpl

This PR has:

  • been self-reviewed.
    • concurrent read
    • concurrent write
    • concurrent read and write
  • added documentation for new or modified features or behaviors.
  • added Javadocs for most classes and all non-trivial methods.
  • added or updated version, license, or notice information
  • added comments explaining the "why" and the intent of the code wherever would not be obvious
    for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold
    for code coverage.
  • added integration tests.
  • been tested in a test IoTDB cluster.

Key changed/added classes (or packages if there are too many classes) in this PR

@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 42.10%. Comparing base (8657782) to head (e758265).

Files with missing lines Patch % Lines
.../db/protocol/thrift/impl/ClientRPCServiceImpl.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             dev/1.3   #17743      +/-   ##
=============================================
- Coverage      42.10%   42.10%   -0.01%     
  Complexity       241      241              
=============================================
  Files           3613     3613              
  Lines         238754   238755       +1     
  Branches       29004    29005       +1     
=============================================
- Hits          100533   100522      -11     
- Misses        138221   138233      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant