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

Integ test: forcemerge and snapshot on leader during bootstrap #76

Merged
merged 1 commit into from
Aug 6, 2021

Conversation

soosinha
Copy link
Member

@soosinha soosinha commented Aug 2, 2021

Description

Add integ tests

  • verify that replication is not affected if forcemerge API is called on leader during bootstrap
  • verify that replication is not affected if snapshot is taken on leader during bootstrap

Check List

  • 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.

Copy link
Contributor

@naveenpajjuri naveenpajjuri left a comment

Choose a reason for hiding this comment

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

Looks good to me, have a minor comment.

//flush the index
clusterClient.indices().flush(FlushRequest(indexName), RequestOptions.DEFAULT)
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Add new line.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added

Copy link
Collaborator

@krishna-ggk krishna-ggk left a comment

Choose a reason for hiding this comment

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

Tests look good. Suggested an alternate in case we want to increase probability of hitting our test clause.

How long do these take approximately?

Comment on lines +761 to +847
try {
followerClient.startReplication(StartReplicationRequest("source", leaderIndexName, followerIndexName),
TimeValue.timeValueSeconds(10),
false)
//Given the size of index, the replication should be in RESTORING phase at this point
leaderClient.indices().forcemerge(ForceMergeRequest(leaderIndexName), RequestOptions.DEFAULT)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would replication chunk size give us better probability of assurance? We can set that to a small number and be assured it worked, and we can probably increase it too to later complete the test faster.

Copy link
Member Author

Choose a reason for hiding this comment

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

How long do these take approximately?

It takes approx 30 sec for this test: around 10 sec to fill index with data and around 10 sec to verify the document count at follower side.

Copy link
Member Author

Choose a reason for hiding this comment

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

The suggested setting plugins.replication.index.recovery.chunk_size takes min value as 1MB. So it is not possible to set a small chunk size like 1B. With 1MB chunk size, we still need to index large amount of data.

naveenpajjuri
naveenpajjuri previously approved these changes Aug 2, 2021
Copy link
Contributor

@naveenpajjuri naveenpajjuri left a comment

Choose a reason for hiding this comment

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

LGTM

krishna-ggk
krishna-ggk previously approved these changes Aug 5, 2021
@krishna-ggk krishna-ggk merged commit 8539c84 into opensearch-project:main Aug 6, 2021
@soosinha soosinha deleted the t-forcemerge branch August 6, 2021 05:36
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