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

DRAFT - do not review #145

Closed
wants to merge 2 commits into from
Closed

Conversation

mch2
Copy link
Member

@mch2 mch2 commented Sep 10, 2021

Description

[Describe what this change achieves]

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Marc Handalian <handalm@amazon.com>
override fun minTranslogGenRequired(readers: List<TranslogReader>, writer: TranslogWriter): Long {
val minBySize: Long = getMinTranslogGenBySize(readers, writer, retentionSizeInBytes)
val minByRetentionLeases: Long = getMinTranslogGenByRetentionLease(readers, writer)
val minByTranslogGenSettings = super.minTranslogGenRequired(readers, writer)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this path getMinTranslogGenBySize will be invoked twice, once here and once by super. minTranslogGenRequired if this is too expensive, can revert back to updating the entire method.

…tionPolicy.

This change allows for a custom deletion policy when setting:
INDEX_TRANSLOG_RETENTION_LEASE_PRUNING_ENABLED_SETTING is enabled that prunes
the translog based on retention leases.

Signed-off-by: Marc Handalian <handalm@amazon.com>
@muralikpbhat
Copy link

Engine is very high level abstraction and one index can have only one engine which makes it very restrictive. https://github.com/opensearch-project/k-NN/blob/main/src/main/java/org/opensearch/knn/plugin/KNNPlugin.java. I was thinking whether we can provide granular extension points from InternalEngine to the plugins so that we can extend specific things in plugins rather than replacing the engine itself. We want to avoid the requirement of setting the engine as replicationengine in the leader index since that index might already have other engine set. Another requirement is that we should be able to make the current indices eligible for replication without imposing any downtime on it.

@krishna-ggk
Copy link
Collaborator

krishna-ggk commented Sep 16, 2021

Engine is very high level abstraction and one index can have only one engine which makes it very restrictive. https://github.com/opensearch-project/k-NN/blob/main/src/main/java/org/opensearch/knn/plugin/KNNPlugin.java. I was thinking whether we can provide granular extension points from InternalEngine to the plugins so that we can extend specific things in plugins rather than replacing the engine itself. We want to avoid the requirement of setting the engine as replicationengine in the leader index since that index might already have other engine set. Another requirement is that we should be able to make the current indices eligible for replication without imposing any downtime on it.

+1 - created OpenSearch#1254 to track this better.

One idea in the above direction is to provide a capability to provide TranslogDeletionPolicy alone. Multiple plugins can provide this. While applying, all policies are invoked and pruned until the min of all.

@krishna-ggk
Copy link
Collaborator

Since we are creating actual PRs, closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants