You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "Caideyipi (via GitHub)" <gi...@apache.org> on 2026/10/21 08:00:28 UTC

[PR] Fix concurrent device attribute update serialization counts [iotdb]

Caideyipi opened a new pull request, #18959:
URL: https://github.com/apache/iotdb/pull/18959

   ## Description
   
   Fix corrupt device attribute cache update payloads observed in the flaky table-model `IoTDBPipeDataSinkIT.testLoadTsFileWithoutVerify` (expected 580 rows, received 500). The receiver logs show `OutOfMemoryError: Java heap space` in `UpdateDetailContainer.deserialize` while reading a device ID, followed by repeated LOAD failures with status 1808.
   
   `getUpdateContent` runs concurrently with schema updates. Its weakly consistent iterators can omit concurrent insertions, but the serializers overwrite the encoded table/device/attribute counts with the current collection sizes after traversal. A count larger than the payload misaligns decoding and can turn device bytes into a huge string allocation.
   
   Write the counts of entries actually serialized at every detail-container level and in the clear container. Preserve the wire format and byte-limit behavior. Add deterministic regression tests for table, device, and attribute insertions during serialization, checking counts and complete round trips without timing-dependent threads.
   
   ## Validation
   
   - Compiled the affected production classes and regression tests with `javac` against the available local dependency classpath, then ran JUnitCore with `-Xmx128m`: **3 tests passed**.
   - Ran the same tests against the unchanged `origin/master` serializers at `7f0ef94f0c0`: **all 3 failed** with encoded count 2 instead of 1.
   - `mvn spotless:apply -pl iotdb-core/datanode` with the changed-file filter: passed.
   - `git diff --check`: passed.
   - The complete dual-cluster IT and full reactor build have not been rerun locally.
   
   This PR has:
   - [x] been self-reviewed for concurrent reads and writes.
   - [x] added deterministic regression tests.
   - [x] added a comment explaining the concurrency requirement.


-- 
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: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix concurrent device attribute update serialization counts [iotdb]

Posted by "jt2594838 (via GitHub)" <gi...@apache.org>.
jt2594838 merged PR #18959:
URL: https://github.com/apache/iotdb/pull/18959


-- 
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: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org