Files
tasks/api/errordetails/v1/message.go-helpers.pb.go
David ReissandGitHub dd3c0ac452 Dynamic partitioning: client side (#9732)
## What changed?
Add client-side of dynamic partition scaling: `partitionCache`,
`PartitionCounts`, `StalePartitionCounts` error,
`invokeWithPartitionCounts`.

The intended behavior is:

For partition-aware calls (add+poll tasks), the client caches the
partition count for active task queues, and uses those partition counts
for load balancing (no change to load balancing algorithm yet). The
client sends its cached partition counts to the server in a grpc header,
and receives updated partition counts with the response in a grpc
trailer. If the updated counts are different, it updates its cache it
for subsequent requests. If the server indicates that the client's view
of partition count is stale, it returns a special `StalePartitionCounts`
error and then client makes one immediate retry with the newly received
counts.

With just this PR by itself, the server will never send counts, the
cache will always be empty, and the client will always fall back to
dynamic config for partition counts, so there's no change in behavior
yet.

## Why?
Implement half of dynamic partition scaling.

## How did you test it?
- [ ] built
- [ ] run locally and tested manually
- [ ] covered by existing tests
- [x] added new unit test(s)
- [x] added new functional test(s) ­– tests are in future PRs
2026-04-17 16:54:19 -07:00

377 lines
11 KiB
Go

// Code generated by protoc-gen-go-helpers. DO NOT EDIT.
package errordetails
import (
"google.golang.org/protobuf/proto"
)
// Marshal an object of type TaskAlreadyStartedFailure to the protobuf v3 wire format
func (val *TaskAlreadyStartedFailure) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type TaskAlreadyStartedFailure from the protobuf v3 wire format
func (val *TaskAlreadyStartedFailure) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *TaskAlreadyStartedFailure) Size() int {
return proto.Size(val)
}
// Equal returns whether two TaskAlreadyStartedFailure values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *TaskAlreadyStartedFailure) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *TaskAlreadyStartedFailure
switch t := that.(type) {
case *TaskAlreadyStartedFailure:
that1 = t
case TaskAlreadyStartedFailure:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}
// Marshal an object of type CurrentBranchChangedFailure to the protobuf v3 wire format
func (val *CurrentBranchChangedFailure) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type CurrentBranchChangedFailure from the protobuf v3 wire format
func (val *CurrentBranchChangedFailure) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *CurrentBranchChangedFailure) Size() int {
return proto.Size(val)
}
// Equal returns whether two CurrentBranchChangedFailure values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *CurrentBranchChangedFailure) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *CurrentBranchChangedFailure
switch t := that.(type) {
case *CurrentBranchChangedFailure:
that1 = t
case CurrentBranchChangedFailure:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}
// Marshal an object of type ShardOwnershipLostFailure to the protobuf v3 wire format
func (val *ShardOwnershipLostFailure) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type ShardOwnershipLostFailure from the protobuf v3 wire format
func (val *ShardOwnershipLostFailure) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *ShardOwnershipLostFailure) Size() int {
return proto.Size(val)
}
// Equal returns whether two ShardOwnershipLostFailure values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *ShardOwnershipLostFailure) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *ShardOwnershipLostFailure
switch t := that.(type) {
case *ShardOwnershipLostFailure:
that1 = t
case ShardOwnershipLostFailure:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}
// Marshal an object of type RetryReplicationFailure to the protobuf v3 wire format
func (val *RetryReplicationFailure) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type RetryReplicationFailure from the protobuf v3 wire format
func (val *RetryReplicationFailure) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *RetryReplicationFailure) Size() int {
return proto.Size(val)
}
// Equal returns whether two RetryReplicationFailure values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *RetryReplicationFailure) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *RetryReplicationFailure
switch t := that.(type) {
case *RetryReplicationFailure:
that1 = t
case RetryReplicationFailure:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}
// Marshal an object of type SyncStateFailure to the protobuf v3 wire format
func (val *SyncStateFailure) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type SyncStateFailure from the protobuf v3 wire format
func (val *SyncStateFailure) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *SyncStateFailure) Size() int {
return proto.Size(val)
}
// Equal returns whether two SyncStateFailure values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *SyncStateFailure) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *SyncStateFailure
switch t := that.(type) {
case *SyncStateFailure:
that1 = t
case SyncStateFailure:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}
// Marshal an object of type StickyWorkerUnavailableFailure to the protobuf v3 wire format
func (val *StickyWorkerUnavailableFailure) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type StickyWorkerUnavailableFailure from the protobuf v3 wire format
func (val *StickyWorkerUnavailableFailure) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *StickyWorkerUnavailableFailure) Size() int {
return proto.Size(val)
}
// Equal returns whether two StickyWorkerUnavailableFailure values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *StickyWorkerUnavailableFailure) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *StickyWorkerUnavailableFailure
switch t := that.(type) {
case *StickyWorkerUnavailableFailure:
that1 = t
case StickyWorkerUnavailableFailure:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}
// Marshal an object of type ObsoleteDispatchBuildIdFailure to the protobuf v3 wire format
func (val *ObsoleteDispatchBuildIdFailure) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type ObsoleteDispatchBuildIdFailure from the protobuf v3 wire format
func (val *ObsoleteDispatchBuildIdFailure) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *ObsoleteDispatchBuildIdFailure) Size() int {
return proto.Size(val)
}
// Equal returns whether two ObsoleteDispatchBuildIdFailure values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *ObsoleteDispatchBuildIdFailure) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *ObsoleteDispatchBuildIdFailure
switch t := that.(type) {
case *ObsoleteDispatchBuildIdFailure:
that1 = t
case ObsoleteDispatchBuildIdFailure:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}
// Marshal an object of type ObsoleteMatchingTaskFailure to the protobuf v3 wire format
func (val *ObsoleteMatchingTaskFailure) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type ObsoleteMatchingTaskFailure from the protobuf v3 wire format
func (val *ObsoleteMatchingTaskFailure) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *ObsoleteMatchingTaskFailure) Size() int {
return proto.Size(val)
}
// Equal returns whether two ObsoleteMatchingTaskFailure values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *ObsoleteMatchingTaskFailure) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *ObsoleteMatchingTaskFailure
switch t := that.(type) {
case *ObsoleteMatchingTaskFailure:
that1 = t
case ObsoleteMatchingTaskFailure:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}
// Marshal an object of type ActivityStartDuringTransitionFailure to the protobuf v3 wire format
func (val *ActivityStartDuringTransitionFailure) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type ActivityStartDuringTransitionFailure from the protobuf v3 wire format
func (val *ActivityStartDuringTransitionFailure) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *ActivityStartDuringTransitionFailure) Size() int {
return proto.Size(val)
}
// Equal returns whether two ActivityStartDuringTransitionFailure values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *ActivityStartDuringTransitionFailure) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *ActivityStartDuringTransitionFailure
switch t := that.(type) {
case *ActivityStartDuringTransitionFailure:
that1 = t
case ActivityStartDuringTransitionFailure:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}
// Marshal an object of type StalePartitionCountsFailure to the protobuf v3 wire format
func (val *StalePartitionCountsFailure) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type StalePartitionCountsFailure from the protobuf v3 wire format
func (val *StalePartitionCountsFailure) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *StalePartitionCountsFailure) Size() int {
return proto.Size(val)
}
// Equal returns whether two StalePartitionCountsFailure values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *StalePartitionCountsFailure) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *StalePartitionCountsFailure
switch t := that.(type) {
case *StalePartitionCountsFailure:
that1 = t
case StalePartitionCountsFailure:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}