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

   ## Description
   
   Target `dev/1.3`.
   
   The OPC UA sink previously issued and awaited one `writeValue` RPC for every 
measurement in a tablet. This change collects the writes for a tablet and sends 
them through one `writeValues` request.
   
   Missing-node recovery is preserved:
   
   - inspect each returned status and collect only `Bad_NodeIdUnknown` writes;
   - deduplicate shared nodes before calling `addNodes`;
   - retry only the writes whose nodes were missing;
   - continue to fail immediately on other bad statuses with measurement 
context.
   
   Unit tests cover a successful multi-measurement batch, missing-node creation 
and selective retry, and a non-recoverable write status.
   
   ## Verification
   
   ```shell
   mvn -o -nsu -pl iotdb-core/datanode \
     "-Ddevelocity.off=true" \
     "-Dtest=IoTDBOpcUaClientTest" \
     "-Dsurefire.failIfNoSpecifiedTests=false" \
     surefire:test
   ```
   
   Result: 3 tests run, 0 failures, 0 errors, 0 skipped.
   
   `git diff --check origin/dev/1.3...HEAD` also passed.
   
   ### Local synthetic benchmark
   
   A local-only benchmark harness (not included in this commit) compared the 
previous per-measurement request pattern with the batch request under a 
simulated 5 ms response delay:
   
   | Measurements per tablet | Previous RPCs | Batch RPCs | Previous median | 
Batch median | Speedup |
   | ---: | ---: | ---: | ---: | ---: | ---: |
   | 100 | 100 | 1 | 1547.574 ms/tablet | 15.329 ms/tablet | 100.96x |
   
   The benchmark test passed (1 test, 0 failures/errors/skips). This is a 
synthetic RPC-count/latency comparison rather than a measurement of production 
OPC UA server throughput.
   
   <hr>
   
   This PR has:
   
   - [x] been self-reviewed.
   - [x] added unit tests for the new batch and recovery paths.
   
   <hr>
   
   ##### Key changed/added classes
   
   - `IoTDBOpcUaClient`
   - `IoTDBOpcUaClientTest`
   


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