Skip to content

[Improve][SDK] Optimize worker selection logic in DataProxy Go SDK #12120

@yfsn666

Description

@yfsn666

Description

The current worker selection logic uses a single-shot round-robin strategy: it picks only one worker per request and immediately returns an error if that worker is busy, without attempting any others. When a single endpoint hangs or comes under heavy load, the worker queue bound to that endpoint can fill up rapidly, resulting in a large number of ErrNoAvailableWorker errors—even when other workers remain idle.

A better approach would be to iterate through all workers and pick the first idle one, returning an error only when all workers are busy.

InLong Component

InLong SDK

Are you willing to submit PR?

  • Yes, I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions