-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Add a java level freeze/unfreeze API #35353
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
Conversation
This change adds a high level freeze API that allows to open an index frozen and vice versa. Indices must be closed in order to become frozen and an open but frozen index must be closed to be defrosted. This change also adds a `index.frozen` setting to mark frozen indices and integrates the frozen engine with the `SearchOperationListener` that resets and releases the directory reader after and before search phases. Relates to elastic#34352 Depends on elastic#34357
Pinging @elastic/es-distributed |
@bleskes I pushed changes to split out the open part of the freezing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very simple - I left some minor comments
...lugin/core/src/main/java/org/elasticsearch/xpack/core/action/TransportFreezeIndexAction.java
Outdated
Show resolved
Hide resolved
...lugin/core/src/main/java/org/elasticsearch/xpack/core/action/TransportFreezeIndexAction.java
Outdated
Show resolved
Hide resolved
x-pack/plugin/core/src/test/java/org/elasticsearch/index/engine/FrozenIndexTests.java
Outdated
Show resolved
Hide resolved
x-pack/plugin/core/src/test/java/org/elasticsearch/index/engine/FrozenIndexTests.java
Show resolved
Hide resolved
@tlrx I pushed changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Left one comment about the handling of index blocks.
x-pack/plugin/core/src/main/java/org/elasticsearch/index/engine/FrozenEngine.java
Outdated
Show resolved
Hide resolved
...lugin/core/src/main/java/org/elasticsearch/xpack/core/action/TransportFreezeIndexAction.java
Outdated
Show resolved
Hide resolved
x-pack/plugin/core/src/test/java/org/elasticsearch/index/engine/FrozenIndexTests.java
Outdated
Show resolved
Hide resolved
x-pack/plugin/core/src/test/java/org/elasticsearch/index/engine/FrozenIndexTests.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, left 3 minor comments
...lugin/core/src/main/java/org/elasticsearch/xpack/core/action/TransportFreezeIndexAction.java
Outdated
Show resolved
Hide resolved
...lugin/core/src/main/java/org/elasticsearch/xpack/core/action/TransportFreezeIndexAction.java
Outdated
Show resolved
Hide resolved
...lugin/core/src/main/java/org/elasticsearch/xpack/core/action/TransportFreezeIndexAction.java
Outdated
Show resolved
Hide resolved
This change adds a high level freeze API that allows to mark an index as frozen and vice versa. Indices must be closed in order to become frozen and an open but frozen index must be closed to be defrosted. This change also adds a index.frozen setting to mark frozen indices and integrates the frozen engine with the SearchOperationListener that resets and releases the directory reader after and before search phases. Relates to #34352 Depends on #34357
This change adds a high level freeze API that allows to mark an
index as frozen and vice versa. Indices must be closed in order to
become frozen and an open but frozen index must be closed to be
defrosted. This change also adds a
index.frozen
setting tomark frozen indices and integrates the frozen engine with the
SearchOperationListener
that resets and releases the directoryreader after and before search phases.
Relates to #34352
Depends on #34357