fix: close stream adaptive gaps and switch notify to stario v0.1.1
- make stream fast path honor adaptive soft payload limits end-to-end - split oversized fast-stream payloads into sequential frames before batching - use adaptive soft cap when encoding stream batch payloads - move timeout-like error detection into production code for adaptive tx - tune notify FrameReader read size explicitly to avoid throughput regression - drop local stario replace and depend on released b612.me/stario v0.1.1
This commit is contained in:
+30
-14
@@ -3,20 +3,24 @@ package notify
|
||||
import "time"
|
||||
|
||||
type snapshotBindingDiagnostics struct {
|
||||
BindingOwner string
|
||||
BindingAlive bool
|
||||
BindingCurrent bool
|
||||
BindingReason string
|
||||
BindingError string
|
||||
TransportAttached bool
|
||||
TransportHasRuntimeConn bool
|
||||
TransportCurrent bool
|
||||
TransportDetachReason string
|
||||
TransportDetachKind string
|
||||
TransportDetachError string
|
||||
TransportDetachGeneration uint64
|
||||
TransportDetachedAt time.Time
|
||||
ReattachEligible bool
|
||||
BindingOwner string
|
||||
BindingAlive bool
|
||||
BindingCurrent bool
|
||||
BindingReason string
|
||||
BindingError string
|
||||
BindingBulkAdaptiveSoftPayloadBytes int
|
||||
BindingStreamAdaptiveSoftPayloadBytes int
|
||||
BindingStreamAdaptiveWaitThresholdBytes int
|
||||
BindingStreamAdaptiveFlushDelay time.Duration
|
||||
TransportAttached bool
|
||||
TransportHasRuntimeConn bool
|
||||
TransportCurrent bool
|
||||
TransportDetachReason string
|
||||
TransportDetachKind string
|
||||
TransportDetachError string
|
||||
TransportDetachGeneration uint64
|
||||
TransportDetachedAt time.Time
|
||||
ReattachEligible bool
|
||||
}
|
||||
|
||||
func snapshotBindingDiagnosticsFromClient(c *ClientCommon, sessionEpoch uint64) snapshotBindingDiagnostics {
|
||||
@@ -36,6 +40,12 @@ func snapshotBindingDiagnosticsFromClient(c *ClientCommon, sessionEpoch uint64)
|
||||
diag.TransportAttached = c.clientTransportAttachedSnapshot()
|
||||
diag.TransportHasRuntimeConn = c.clientTransportConnSnapshot() != nil
|
||||
diag.TransportCurrent = diag.BindingCurrent && diag.TransportAttached
|
||||
if binding := c.clientTransportBindingSnapshot(); binding != nil {
|
||||
diag.BindingBulkAdaptiveSoftPayloadBytes = binding.bulkAdaptiveSoftPayloadBytesSnapshot()
|
||||
diag.BindingStreamAdaptiveSoftPayloadBytes = binding.streamAdaptiveSoftPayloadBytesSnapshot()
|
||||
diag.BindingStreamAdaptiveWaitThresholdBytes = binding.streamAdaptiveWaitThresholdBytesSnapshot()
|
||||
diag.BindingStreamAdaptiveFlushDelay = binding.streamAdaptiveFlushDelaySnapshot()
|
||||
}
|
||||
return diag
|
||||
}
|
||||
|
||||
@@ -72,5 +82,11 @@ func snapshotBindingDiagnosticsFromLogical(logical *LogicalConn, transport *Tran
|
||||
diag.TransportCurrent = runtime.TransportAttached
|
||||
}
|
||||
diag.BindingCurrent = diag.BindingAlive && diag.TransportCurrent
|
||||
if binding := logical.transportBindingSnapshot(); binding != nil {
|
||||
diag.BindingBulkAdaptiveSoftPayloadBytes = binding.bulkAdaptiveSoftPayloadBytesSnapshot()
|
||||
diag.BindingStreamAdaptiveSoftPayloadBytes = binding.streamAdaptiveSoftPayloadBytesSnapshot()
|
||||
diag.BindingStreamAdaptiveWaitThresholdBytes = binding.streamAdaptiveWaitThresholdBytesSnapshot()
|
||||
diag.BindingStreamAdaptiveFlushDelay = binding.streamAdaptiveFlushDelaySnapshot()
|
||||
}
|
||||
return diag
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user