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

   ## Description
   
   An oversized first deletion was acknowledged as `SUCCESS` even when 
`serializeDeletionToBatchBuffer()` returned `false`, leaving no recoverable DAL 
record. The deletion callers only propagate `FAILURE`, so they could continue 
with that false acknowledgment. Both log rotation paths also acknowledged a 
batch after closing its channel without calling `force(false)`.
   
   Reject an oversized first record through the existing persistence failure 
path before updating its progress index. Clear failed batch state so a later 
successful batch cannot acknowledge failed resources. Force the rotated log 
before closing it and delivering success, and propagate a force failure to the 
waiting callers. The new error message is provided in both locales.
   
   #18662 is already merged in the base and fixes the close/flush accounting 
race; these serialization and rotation paths remain affected. Its regression 
test is retained.
   
   ## Validation
   
   - All four new regression tests fail against the original master 
implementation and pass with this change. They cover an oversized first 
deletion followed by a recoverable valid deletion, force ordering on both 
rotation paths, and force failure followed by another batch.
   - Maven: `PageCacheDeletionBufferTest`, `DeletionResourceTest`, and 
`DeletionRecoverTest` — 13 tests, 0 failures/errors/skips. Run with:
   
     ```sh
     mvn -pl iotdb-core/datanode -am test \
       
-Dtest=PageCacheDeletionBufferTest,DeletionResourceTest,DeletionRecoverTest \
       -DfailIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false \
       -Diotdb.test.skip=false -Diotdb.ut.skip=false
     ```
   
   - Full reactor English `mvn test-compile -DskipTests` — passed (53 modules).
   - Full reactor Chinese `mvn test-compile -P with-zh-locale -DskipTests` — 
passed (53 modules).
   - `mvn -pl iotdb-core/datanode spotless:check checkstyle:check` — passed; 
`git diff --check` is clean. The locale message keys and format specifiers 
match.
   
   <hr>
   
   This PR has:
   
   - [x] been self-reviewed.
   - [x] added comments explaining the intent of the code.
   - [x] added unit tests covering the affected code paths.
   
   ##### Key changed classes
   
   `PageCacheDeletionBuffer`, `PageCacheDeletionBufferTest`, and 
`DataNodePipeMessages` (en/zh).
   


-- 
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]

Reply via email to