Skip to content

Revive read/write engine lock to guard operations against resets #126311

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

Merged
merged 26 commits into from
Apr 10, 2025
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
sameInstance
  • Loading branch information
tlrx committed Apr 10, 2025
commit 93c25daf97f4925bbe830b9247ca7909d6b0aedb
Original file line number Diff line number Diff line change
Expand Up @@ -5202,9 +5202,11 @@ public void prepareForEngineReset() throws IOException {
});
});
holdEngineThread.start();
safeGet(hold);
var retainedInstance = safeGet(hold);

assertThat(shard.getEngine(), instanceOf(InternalEngine.class));
var currentInstance = shard.getEngine();
assertThat(currentInstance, instanceOf(InternalEngine.class));
assertThat(currentInstance, sameInstance(retainedInstance));

final var reset = new PlainActionFuture<Void>();
final var resetEngineThread = new Thread(() -> {
Expand Down