Skip to content

Fix idempotent table cache update handling#17959

Merged
JackieTien97 merged 1 commit into
apache:masterfrom
Caideyipi:fix/datanode-table-cache-idempotent-master
Jun 17, 2026
Merged

Fix idempotent table cache update handling#17959
JackieTien97 merged 1 commit into
apache:masterfrom
Caideyipi:fix/datanode-table-cache-idempotent-master

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

This PR makes DataNode table cache update handling idempotent when a commit or rollback update request is repeated or arrives after the pre-update entry has already been cleared. commitUpdateTable previously read the pre-update table and wrote it into a ConcurrentHashMap without checking for null, so a delayed duplicate commit could throw an NPE after the entry was already handled. The change treats missing or cleared pre-update entries as already handled and makes removeTableFromPreUpdateMap tolerant of absent entries. Tests: mvn -pl iotdb-core/datanode -am -Dtest=DataNodeTableCacheTest -DfailIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false -Dspotless.skip=true -Dcheckstyle.skip=true test -DskipITs; mvn -pl iotdb-core/datanode -DskipTests -DskipITs spotless:check checkstyle:check.

@JackieTien97 JackieTien97 merged commit c94c9a3 into apache:master Jun 17, 2026
40 checks passed
@Caideyipi Caideyipi deleted the fix/datanode-table-cache-idempotent-master branch June 17, 2026 01:51
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.

2 participants