Skip to content

[8.19] [Obs AI Assistant] Remove index write blocks (#220362)#220507

Merged
sorenlouv merged 1 commit intoelastic:8.19from
sorenlouv:backport/8.19/pr-220362
May 8, 2025
Merged

[8.19] [Obs AI Assistant] Remove index write blocks (#220362)#220507
sorenlouv merged 1 commit intoelastic:8.19from
sorenlouv:backport/8.19/pr-220362

Conversation

@sorenlouv
Copy link
Member

Backport

This will backport the following commits from main to 8.19:

Questions ?

Please refer to the Backport tool documentation

Closes elastic#220248

- This PR removes the write index blocks that were previously added when
starting a reindex operation. The index blocks were added to prevent
writes to the source index, while it was being re-indexed to a target
index.
- Re-enables tests to run on MKI

Why index blocks should be removed:

- Immediately after creating the target index, the KB write index alias
is pointed over to the new target index. This means that it is possible
to ingest documents to the new target index, while the re-index is in
progress. Thus, we no longer need to block writes
- Index blocks must be cleaned up. If a node crashes after a re-index
operation has been started, the reindex operation itself will continue
to run because it is handled by Elasticsearch with all the guarantees it
provides. However, the index block will not be removed again, causing a
permanent dead lock until customers remove the index block themselves.
Customers should not end up in this situation.
- Index blocks are causing tests to fail, when the index block is not
properly cleaned up afterwards:
elastic#220248

---------

Co-authored-by: Viduni Wickramarachchi <viduni.wickramarachchi@elastic.co>
Co-authored-by: Viduni Wickramarachchi <viduni.ushanka@gmail.com>
(cherry picked from commit 3c95148)

# Conflicts:
#	x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_basic_operations.spec.ts
#	x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_change_model_from_elser_to_e5.spec.ts
#	x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_status.spec.ts
@sorenlouv sorenlouv requested a review from kibanamachine as a code owner May 8, 2025 12:46
@sorenlouv sorenlouv added the backport This PR is a backport of another PR label May 8, 2025
@sorenlouv sorenlouv enabled auto-merge (squash) May 8, 2025 12:46
@botelastic botelastic bot added the Team:Obs AI Assistant Observability AI Assistant label May 8, 2025
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

@sorenlouv sorenlouv merged commit ae74dbf into elastic:8.19 May 8, 2025
13 checks passed
@sorenlouv sorenlouv deleted the backport/8.19/pr-220362 branch May 8, 2025 17:50
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