455
}
456
458
>
// note this sends the trailer even if there is no scale info (i.e. dynamic partition
459
>
// scaling is not enabled). that will instruct clients to fall back to dynamic config.
460
>
scaleInfo := pm.userDataManager.PartitionScale()
461
>
err := matching.PartitionCounts{
462
>
Read: scaleInfo.GetRead(),
463
>
Write: scaleInfo.GetWrite(),
464
>
BacklogCap: number.Compact8(scaleInfo.GetBacklogCap()),
465
>
BacklogCount: []byte(scaleInfo.GetBacklogCounts()),
466
>
}.SetTrailer(ctx)
467
>
if err != nil {
468
// TODO(dp): this is very noisy in unit tests, figure out how to log it only in non-test
469
pm.throttledLogger.Debug("error setting partition count trailer", tag.Error(err))