Skip to content

[8.x] [Obs AI Assistant] Distributed lock manager (#216397)#216737

Merged
kibanamachine merged 2 commits intoelastic:8.xfrom
kibanamachine:backport/8.x/pr-216397
Apr 2, 2025
Merged

[8.x] [Obs AI Assistant] Distributed lock manager (#216397)#216737
kibanamachine merged 2 commits intoelastic:8.xfrom
kibanamachine:backport/8.x/pr-216397

Conversation

@kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

Closes elastic/obs-ai-team#238

This introduces a lightweight library for managing distributed locks
using Elasticsearch. It lets developers coordinate operations across
multiple Kibana instances by ensuring that only one client holds a given
lock at a time. The library uses an Elasticsearch index with TTL-based
locks.

Usage:

```ts
const lockManagerService = new LockManagerService(coreSetup, logger);
lockManagerService.withLock('my_lock', () => {
 // perform operation
});
```

(cherry picked from commit f4980d0)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Apr 1, 2025
@kibanamachine kibanamachine enabled auto-merge (squash) April 1, 2025 22:32
@botelastic botelastic bot added the Team:Obs AI Assistant Observability AI Assistant label Apr 1, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant)

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

ESLint disabled line counts

id before after diff
observabilityAIAssistant 6 7 +1

Total ESLint disabled count

id before after diff
observabilityAIAssistant 8 9 +1

cc @sorenlouv

@kibanamachine kibanamachine merged commit 60be77e into elastic:8.x Apr 2, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR Team:Obs AI Assistant Observability AI Assistant

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants