-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Segment Replication - Support realtime reads with GET requests #8536
Comments
Took a closer look at this - WIP mch2@db72e96 To support this on replicas we would need to use a versionMap similar to InternalEngine that tracks a live view of doc uuid to translog location.
An alternative here is to route any Get req where "realtime" is specified to true to the primary shard in the group. The problem with this is by default all Get requests have realtime=true enabled, so if we do this all Get reqs would only route to primary shards and can be problematic under heavy load. I think providing this option is a better solution though for sensitive requests and if users are performing a high volume of GET requests then document replication would be a better option. |
We will also need to extend this support to MultiGet |
The alternative scenario is: When realtime=true, users can also set the preference parameter for GET requests to "_local" or specific shards. In that case, we give priority to the user specified preference for the shard when we decide where the requests should be routed to. https://opensearch.org/docs/1.3/api-reference/document-apis/get-documents/ |
Describe the bug
Today document replication provides the option for "realtime" reads with the GET API that reads and parses source from the translog to serve strong reads. This same option should be supported while using segment replication because each shard copy still has the ability to read the translog, however today the NRTReplicationEngine only reads the index when serving GET requests.
Expected behavior
GET requests "realtime" option to be supported with segment replicaiton.
The text was updated successfully, but these errors were encountered: