Skip to content

ES sampling index rotation ignores remote_read_clusters #9468

Description

@magic-peach

buildSamplingRotation() (internal/storage/v2/elasticsearch/factory_base.go) passes nil for remote clusters instead of the configured remote_read_clusters value, unlike buildDependencyRotation() and the span/service rotations, which already thread that config through.

So a cluster configured with remote_read_clusters gets cross-cluster reads for dependency, span, and service indices, but not for the sampling index. Same config, inconsistent behavior depending on which index type is being read.

Fix is small: pass the same config value through buildSamplingRotation() that the other rotations already use.

Activity

  1. arpitjain099 commented on Sep 3, 2026

    @arpitjain099

    Worth noting before anyone patches this: the nil looks deliberate rather than missed. There is a TODO directly above the function:

    // TODO: Support RemoteClusters for sampling via a feature flag.
    func (f *FactoryBase) buildSamplingRotation() indices.Rotation {

    So the inconsistency is real, but the shape of the fix is a decision rather than a one-liner: passing f.config.RemoteReadClusters straight through turns cross-cluster sampling reads on for everyone who already sets remote_read_clusters, which is what that TODO seems to be holding back. Happy to send either version, the unconditional one or one behind a flag, if you say which you want.

  2. magic-peach commented on Sep 3, 2026

    @magic-peach
    ContributorAuthor

    @arpitjain099 I am working on this and will send the pr soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions