hongzhi-gao opened a new pull request, #17974:
URL: https://github.com/apache/iotdb/pull/17974

   ## Summary
   
   Fixes IoTConsensus AddPeer snapshot load when snapshot fragments are spread 
across multiple receive folders (one per local data dir).
   
   Previously, `loadSnapshot` was called once per receive folder. DataRegion 
loading wipes data dirs before relinking, so each call erased fragments from 
earlier folders and only the last folder’s data survived.
   
   Now IoTConsensus collects all folders that actually hold snapshot fragments 
and passes them in a single `loadSnapshot(List<File>)` call. 
`DataRegionStateMachine` and `SnapshotLoader` clear data dirs once and relink 
fragments from every folder.
   
   ## Test plan
   
   - [x] `IoTDBSnapshotTest#testLoadSnapshotSpreadAcrossReceiveFolders`
   - [x] 
`IoTDBSnapshotTest#testLoadSnapshotFromReceiveFoldersIsOrderIndependent`


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