Repository navigation
Support strictly unidirectional UDP air-gap transfer - #19063
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #19063 +/- ##
============================================
+ Coverage 48.05% 48.16% +0.11%
- Complexity 604 621 +17
============================================
Files 5572 5572
Lines 410194 410442 +248
Branches 54112 54165 +53
============================================
+ Hits 197110 197688 +578
+ Misses 213084 212754 -330 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Initial self-review round: reviewed the complete 19-file diff and relevant context at Found and fixed one P2 cancellation issue in Final local commit and confirmed remote branch/PR head: Verification:
The PR remains draft because this round found a behavioral issue. A fresh independent review of the complete final diff is required before marking it ready. |
|
|
Independent re-review round: reviewed the complete 19-file PR diff and relevant context at The review covered repeated-handshake authentication and state reuse, partial files and pending slices, compressed and sliced request context, bounded UDP buffering and ordered consumption, shutdown interruption, ACK/NACK suppression, configuration scope, and compatibility with the acknowledged transports. The comparison merge base is Verification: this was a read-only review. Existing recorded receiver tests, English/Chinese compilation, and realtime/compressed-history transfer evidence were inspected. Builds and executable tests were not rerun, as requested. Local HEAD and the confirmed source-branch/PR head are all GitHub CI is separate from this review approval and is not fully green. DataNode unit tests on Linux and Windows, dependency checks, and Chinese compilation completed successfully. SonarCloud Code Analysis reports a failed quality gate; its annotations cover equality, complexity, style, and other static-analysis suggestions. The Windows table-standalone shard failed at This complete round meets the independent-review gate. Immediately before marking ready, the local commit, source branch, and PR head were rechecked and still matched the reviewed SHA. The ready transition succeeded and returned |
| private static final int LISTENER_THREAD_COUNT = 2; | ||
| private static final int LISTENER_THREAD_COUNT = 3; | ||
| private static final int UDP_REQUEST_QUEUE_CAPACITY = 4_096; | ||
| private static final int UDP_REQUEST_QUEUE_BYTES = 32 * 1024 * 1024; |
There was a problem hiding this comment.
The new property only controls the kernel socket receive buffer. The copied application queue remains fixed at 4,096 packets and 32 MiB, and the sender UDP packet-size and request-slice settings do not configure these limits. Could we expose the queue bounds through receiver configuration, or explicitly confirm that they are intentionally fixed? As written, receive buffering cannot be tuned end to end.




Strict one-way links discard all reverse traffic, so an air-gap UDP sink waiting for acknowledgements stalls pipe creation. Add
sink.air-gap.strict-unidirectional=true(also available under theconnectorprefix), restricted to UDP and disabled by default. The sender marks no-response datagrams, and the receiver suppresses both ACK and NACK.Repeated identical strict handshakes reauthenticate without resetting receiver files or pending slices. Preserve strict-mode context through compressed requests and reconstructed slices, avoid session refreshes for empty heartbeats, and drain the UDP socket into a bounded queue with ordered request processing. Interrupted receiver retries exit without recursively reentering request handling.
The per-Pipe sink parameter
sink.air-gap.udp.send-interval-ms(with aconnectoralias) spaces every strict UDP datagram, including slices. It defaults to 5 ms; 0 disables pacing. The receiver requests a 32 MiB socket buffer through the internal global propertypipe_air_gap_receiver_udp_socket_buffer_size_in_bytes, without adding it to user configuration templates.Validation:
Strict mode confirms only a local send. Delivery and receiver errors cannot be confirmed through the one-way link. Both endpoints must support this mode; acknowledged transmission remains the default.