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

[BUG] Retention lease fails even when the index is active for replication #1472

Open
skumarp7 opened this issue Jan 2, 2025 · 3 comments
Open
Labels
bug Something isn't working

Comments

@skumarp7
Copy link
Contributor

skumarp7 commented Jan 2, 2025

What is the bug?
I have a scenario in ccr where the retention lease is getting expired:

  1. Install leader and follower.
  2. Set the index settings as such:
"index.plugins.replication.translog.retention_lease.pruning.enabled": "true",
"index.plugins.replication.translog.retention_size": "10 MB", 
"index.soft_deletes.retention_lease.period": "5m"
  1. create leader index
  2. verify if Follower index is created.
  3. Now leave the setup for more than 5m without ingesting new records to leader index.

Expectation:
Index should be in "SYNCING" state.
Result:
Retention lease has been expired for the index, hence the index went to "AutoPaused" state.
What might be the issue? Is this expected? Why did the retention lease expire?

@skumarp7 skumarp7 added bug Something isn't working untriaged labels Jan 2, 2025
@skumarp7 skumarp7 changed the title [BUG] [BUG] Retention lease fails even when the index is active for replication Jan 3, 2025
@skumarp7
Copy link
Contributor Author

skumarp7 commented Jan 6, 2025

Hi @ankitkala , @monusingh-1 ,

Any input ?

@soosinha
Copy link
Member

soosinha commented Jan 6, 2025

[Triage - attendees 1 2 3 4]

It looks that since the retention_lease.period is quite small and the retention lease renewal might be running after a longer interval due to which retention lease would have expired.
Code reference: https://github.com/opensearch-project/cross-cluster-replication/blob/main/src/main/kotlin/org/opensearch/replication/task/shard/ShardReplicationTask.kt#L280

@soosinha soosinha removed the untriaged label Jan 6, 2025
@skumarp7
Copy link
Contributor Author

skumarp7 commented Jan 7, 2025

Hi @soosinha ,

Are you saying that the retention lease renewal interval is more than "5m". As per my understanding, doesn't the retention lease gets renewed when the follower polls the leader ? This polling happens even more frequent right ? or is my understanding wrong?

Is there any parameter that controls the retention lease renewal interval ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants