Caideyipi commented on PR #18623: URL: https://github.com/apache/iotdb/pull/18623#issuecomment-6621202363
This independent re-review found two P1 retry-safety defects in `LogicalBackupWriter`. Both are fixed in [f7d21bae403eed07f9ccdb5f8b0f242b11f5e2a1](https://github.com/apache/iotdb/commit/f7d21bae403eed07f9ccdb5f8b0f242b11f5e2a1). Reviewed the full current 52-file diff and relevant context at `5c9adc8a80c5ac176f8d780b840a28b31d3172b7` against `master/e6b44b57e49e1e7f0ecf5d6c62fa7e1f69a9a869`, including the previous ZIP staging, SecureRandom, per-node wait, credentials, Windows launcher, table exclusion, event identity, and write/manifest rollback fixes. 1. **[P1] Make segment rollover failures retry-safe.** [LogicalBackupWriter.java:672-709](https://github.com/apache/iotdb/blob/5c9adc8a80c5ac176f8d780b840a28b31d3172b7/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/logicalbackup/LogicalBackupWriter.java#L672-L709) consumes the segment digest and appends a footer before fsync. A failed force leaves that footer and reset digest available to the next attempt, producing an invalid archive. A sealing-manifest or next-segment creation failure can instead leave `channel == null`, permanently rejecting retries as a closed writer. The fix rolls back failed footer persistence and retains a pending segment transition until reopening and rebuilding succeed before another append. 2. **[P1] Finish a failed rollback before deduplication or another append.** [LogicalBackupWriter.java:1027-1042](https://github.com/apache/iotdb/blob/5c9adc8a80c5ac176f8d780b840a28b31d3172b7/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/logicalbackup/LogicalBackupWriter.java#L1027-L1042) truncates records before forcing and rebuilding state. If that force fails, sequence numbers and deduplication can still describe the removed event: a retry can start at sequence 3 instead of 0, or treat truncated data as already written. The fix retains the rollback position until truncation, force, state reconstruction, and manifest persistence complete, and requires recovery before accepting writes. Validation: - All six added fault-injection regressions failed against the reviewed production source, then passed with the fix. - A clean 29-module dependency reactor passed on Windows with JDK 17: **57 tests, 0 failures, 0 errors, 0 skipped** (writer 30, archive reader 17, DataNode sink 8, ConfigNode sink 2). Required IoTDB dependencies were rebuilt from source; the existing third-party dependency cache was used. - Spotless apply with the integration-test profile and `git diff --check` passed. No production test hooks, public API changes, or message-constant changes were added. - POSIX-only permission assertions, dual-cluster integration tests, and full process restart/failover scenarios were not run this round. Earlier results remain historical. CI is separate from local validation. The reviewed head had 24 successful checks, one failed SonarCloud check, and 16 pending checks at the latest observation for that revision. At `2026-11-04 02:48:17 UTC`, the pushed head had six visible checks (five running, one queued), with no completed results; its combined commit status was pending. Final local HEAD, source branch `apache/iotdb:feat/pipe-logical-backup-sink`, and PR head were all confirmed equal to **`f7d21bae403eed07f9ccdb5f8b0f242b11f5e2a1`**. The PR remains **Open / Draft**. Because this round found behavioral issues, it requires a fresh independent re-review before becoming ready; no second review round was performed in this session. -- 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]
