Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Add routing to Translog #17454

Closed
kkewwei opened this issue Feb 25, 2025 · 4 comments
Closed

[Feature Request] Add routing to Translog #17454

kkewwei opened this issue Feb 25, 2025 · 4 comments
Labels
enhancement Enhancement or improvement to existing feature or request Indexing Indexing, Bulk Indexing and anything related to indexing untriaged

Comments

@kkewwei
Copy link
Contributor

kkewwei commented Feb 25, 2025

Is your feature request related to a problem? Please describe

In our product, we've developed a tool that replays the translog and write to multiple OpenSearch clusters. However, when performing indexing or deletion operations with routing, the target shards turn out to be incorrect. The root cause lies in the fact that the translog does not include the routing.

Describe the solution you'd like

Add routing to Translog

Related component

Indexing

Describe alternatives you've considered

No response

Additional context

No response

@kkewwei kkewwei added enhancement Enhancement or improvement to existing feature or request untriaged labels Feb 25, 2025
@github-actions github-actions bot added the Indexing Indexing, Bulk Indexing and anything related to indexing label Feb 25, 2025
@andrross
Copy link
Member

I assuming you mean this routing parameter, right? I can see why it's not included in the translog...the routing is used to determine the shard but the translog is per-shard so the routing decision has already been made by the time the translog is written to.

@kkewwei
Copy link
Contributor Author

kkewwei commented Feb 26, 2025

Yes, it's the parameter. When it's written in the shard, it's useless for the shard. In some scenarios, we will also reply this doc to other clusters/mysql, and we need this routing to continue makeing decision.

@andrross
Copy link
Member

When it's written in the shard, it's useless for the shard

This is why I would be hesitant to include it in the translog, as it ends up being a small but unnecessary overhead for most use cases.

Would it be possible to implement an ingest pipeline that captures this parameter and writes it into some sort of specially defined field in the documents themselves? You could even add a search pipeline that would filter out this field from search responses if necessary.

@kkewwei
Copy link
Contributor Author

kkewwei commented Feb 27, 2025

Good idea, Thank you.

@kkewwei kkewwei closed this as completed Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request Indexing Indexing, Bulk Indexing and anything related to indexing untriaged
Projects
None yet
Development

No branches or pull requests

2 participants