Repository navigation
Repro and fix recoveryStats double decrement - #149348
Conversation
|
Hi @inespot, I've created a changelog YAML for you. |
|
Pinging @elastic/es-distributed (Team:Distributed) |
🔍 Preview links for changed docs⏳ Building and deploying preview... View progress This comment will be updated with preview links when the build is complete. |
ℹ️ Important: Docs version tagging👋 Thanks for updating the docs! Just a friendly reminder that our docs are now cumulative. This means all 9.x versions are documented on the same page and published off of the main branch, instead of creating separate pages for each minor version. We use applies_to tags to mark version-specific features and changes. Expand for a quick overviewWhen to use applies_to tags:✅ At the page level to indicate which products/deployments the content applies to (mandatory) What NOT to do:❌ Don't remove or replace information that applies to an older version 🤔 Need help?
|
burqen
left a comment
There was a problem hiding this comment.
This looks good to me. Nice repro and simple fix!
Encountered while working on: #149319. Relates to https://github.com/elastic/elasticsearch-team/issues/2809.
When
OngoingRecoveries.cancel(IndexShard)is called during shard close, it decrementsrecoveryStats.currentAsSource()in afinallyblock for each active handler. However, sincecancel()does not remove handlers from the internal map, they remain registered and are subsequently removed via their completion listeners, which callOngoingRecoveries.remove(), triggering a second decrement of the same counter and making thecurrentAsSourcerecovery stat go negative.See repro in gradle