Repository navigation
Conversation
…ies run concurrently with delete time series, or insert data between delete data
Caideyipi
left a comment
There was a problem hiding this comment.
Reviewed commit 31f12aa9f7944fe6247d86952f9f020b6ca4d01c against merge base 45cb9959f16bb5350c136b0e5ca6847cde853d2b. Found one behavioral issue: procedures persisted by the previous version at their old post-delete successor state can bypass the new second cache invalidation. I also left a naming-convention comment on the new log constants. git diff --check passed; no tests were run locally. Required CI checks were pending at review time.
| public static final String FAILED_TO_INVALIDATE_SCHEMAENGINE_CACHE_OF_DEVICES_IN_TABLE = | ||
| "Failed to invalidate schemaEngine cache of devices in table {}.{}"; | ||
| public static final String | ||
| FAILED_TO_INVALIDATE_SCHEMAENGINE_CACHE_OF_DEVICES_IN_TABLE_FIRST_TIME = |
There was a problem hiding this comment.
[P3] Follow the required i18n log-key naming convention. These newly added constants are used as logger templates, but repository guidance requires logger keys to use LOG_<NORMALIZED>_<HASH> with matching en/zh names. Please rename the added log constants accordingly; the current names are unprefixed semantic names.
Summary
This PR fixes the race between LAST queries, write execution, and schema deletion that could restore device schema
entries after a delete procedure had cleaned the cache. The device schema cache is now written only by the analyze-time
schema fetch; LAST queries and write execution update last values only.
Problem
A LAST query can be analyzed before a deletion but declare or put back its result after the first cache invalidation.
Previously this path also wrote device schema, so the deleted schema could be restored after cleanup. A later INSERT
then hit the stale cache entry, skipped auto-creation, wrote data, and left metadata absent. The same class of issue
existed for write FI execution, fenced DataNodes, and concurrent LAST queries with different put-back orders.
Changes
all-null marker removes the entry.
appended to existing enums for ordinal compatibility.
distinguishes it from the first cleanup that also updates DataNodeTableCache.
Compatibility