Skip to content

Commit 5ac8fe5

Browse files
committed
Document the index corruption bug that gets fixed via Lucene 8.5.1. (#55232)
Using soft deletes on shrunk indices may cause corruption.
1 parent a80559a commit 5ac8fe5

File tree

9 files changed

+74
-0
lines changed

9 files changed

+74
-0
lines changed

docs/reference/release-notes/7.0.asciidoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ Also see <<breaking-changes-7.0,Breaking changes in 7.0>>.
99
[float]
1010
=== Known issues
1111

12+
* Applying deletes or updates on an index after it has been shrunk may corrupt
13+
the index. In order to prevent this issue, it is recommended to stop shrinking
14+
read-write indices. For read-only indices, it is recommended to force-merge
15+
indices after shrinking, which significantly reduces the likeliness of this
16+
corruption in the case that deletes/updates would be applied by mistake. This
17+
bug is fixed in {es} 7.7 and later versions. More details can be found on the
18+
https://issues.apache.org/jira/browse/LUCENE-9300[corresponding issue].
19+
1220
* Indices created in 6.x with <<date,`date`>> and <<date_nanos,`date_nanos`>> fields using formats
1321
that are incompatible with java.time patterns will cause parsing errors, incorrect date calculations or wrong search results.
1422
https://github.com/elastic/elasticsearch/pull/52555

docs/reference/release-notes/7.1.asciidoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ Also see <<breaking-changes-7.1,Breaking changes in 7.1>>.
66
[float]
77
=== Known issues
88

9+
* Applying deletes or updates on an index after it has been shrunk may corrupt
10+
the index. In order to prevent this issue, it is recommended to stop shrinking
11+
read-write indices. For read-only indices, it is recommended to force-merge
12+
indices after shrinking, which significantly reduces the likeliness of this
13+
corruption in the case that deletes/updates would be applied by mistake. This
14+
bug is fixed in {es} 7.7 and later versions. More details can be found on the
15+
https://issues.apache.org/jira/browse/LUCENE-9300[corresponding issue].
16+
917
* Indices created in 6.x with <<date,`date`>> and <<date_nanos,`date_nanos`>> fields using formats
1018
that are incompatible with java.time patterns will cause parsing errors, incorrect date calculations or wrong search results.
1119
https://github.com/elastic/elasticsearch/pull/52555

docs/reference/release-notes/7.2.asciidoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,14 @@ Also see <<breaking-changes-7.2,Breaking changes in 7.2>>.
8888
[float]
8989
=== Known issues
9090

91+
* Applying deletes or updates on an index after it has been shrunk may corrupt
92+
the index. In order to prevent this issue, it is recommended to stop shrinking
93+
read-write indices. For read-only indices, it is recommended to force-merge
94+
indices after shrinking, which significantly reduces the likeliness of this
95+
corruption in the case that deletes/updates would be applied by mistake. This
96+
bug is fixed in {es} 7.7 and later versions. More details can be found on the
97+
https://issues.apache.org/jira/browse/LUCENE-9300[corresponding issue].
98+
9199
* Indices created in 6.x with <<date,`date`>> and <<date_nanos,`date_nanos`>> fields using formats
92100
that are incompatible with java.time patterns will cause parsing errors, incorrect date calculations or wrong search results.
93101
https://github.com/elastic/elasticsearch/pull/52555

docs/reference/release-notes/7.3.asciidoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,14 @@ Also see <<breaking-changes-7.3,Breaking changes in 7.3>>.
143143
[float]
144144
=== Known issues
145145

146+
* Applying deletes or updates on an index after it has been shrunk may corrupt
147+
the index. In order to prevent this issue, it is recommended to stop shrinking
148+
read-write indices. For read-only indices, it is recommended to force-merge
149+
indices after shrinking, which significantly reduces the likeliness of this
150+
corruption in the case that deletes/updates would be applied by mistake. This
151+
bug is fixed in {es} 7.7 and later versions. More details can be found on the
152+
https://issues.apache.org/jira/browse/LUCENE-9300[corresponding issue].
153+
146154
* Indices created in 6.x with <<date,`date`>> and <<date_nanos,`date_nanos`>> fields using formats
147155
that are incompatible with java.time patterns will cause parsing errors, incorrect date calculations or wrong search results.
148156
https://github.com/elastic/elasticsearch/pull/52555

docs/reference/release-notes/7.4.asciidoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,14 @@ Also see <<breaking-changes-7.4,Breaking changes in 7.4>>.
111111
[float]
112112
=== Known issues
113113

114+
* Applying deletes or updates on an index after it has been shrunk may corrupt
115+
the index. In order to prevent this issue, it is recommended to stop shrinking
116+
read-write indices. For read-only indices, it is recommended to force-merge
117+
indices after shrinking, which significantly reduces the likeliness of this
118+
corruption in the case that deletes/updates would be applied by mistake. This
119+
bug is fixed in {es} 7.7 and later versions. More details can be found on the
120+
https://issues.apache.org/jira/browse/LUCENE-9300[corresponding issue].
121+
114122
* Activating the <<search-slow-log, search slow log>> should be avoided in this version.
115123
Any attempt to log a slow search can throw an AIOOBE due to a bug that
116124
performs concurrent modifications on a shared byte array.

docs/reference/release-notes/7.5.asciidoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@ Also see <<breaking-changes-7.5,Breaking changes in 7.5>>.
9494
[float]
9595
=== Known issues
9696

97+
* Applying deletes or updates on an index after it has been shrunk may corrupt
98+
the index. In order to prevent this issue, it is recommended to stop shrinking
99+
read-write indices. For read-only indices, it is recommended to force-merge
100+
indices after shrinking, which significantly reduces the likeliness of this
101+
corruption in the case that deletes/updates would be applied by mistake. This
102+
bug is fixed in {es} 7.7 and later versions. More details can be found on the
103+
https://issues.apache.org/jira/browse/LUCENE-9300[corresponding issue].
104+
97105
* Stop all {transforms} during a rolling upgrade to 7.5.
98106
If a {transform} is running during upgrade, the {transform} audit index might disappear.
99107
(issue: {issue}/49730[#49730])

docs/reference/release-notes/7.6.asciidoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,14 @@ Also see <<breaking-changes-7.6,Breaking changes in 7.6>>.
155155
[float]
156156
=== Known issues
157157

158+
* Applying deletes or updates on an index after it has been shrunk may corrupt
159+
the index. In order to prevent this issue, it is recommended to stop shrinking
160+
read-write indices. For read-only indices, it is recommended to force-merge
161+
indices after shrinking, which significantly reduces the likeliness of this
162+
corruption in the case that deletes/updates would be applied by mistake. This
163+
bug is fixed in {es} 7.7 and later versions. More details can be found on the
164+
https://issues.apache.org/jira/browse/LUCENE-9300[corresponding issue].
165+
158166
* Indices created in 6.x with <<date,`date`>> and <<date_nanos,`date_nanos`>> fields using formats
159167
that are incompatible with java.time patterns will cause parsing errors, incorrect date calculations or wrong search results.
160168
https://github.com/elastic/elasticsearch/pull/52555

docs/reference/release-notes/7.7.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ Engine::
447447
* Fix doc_stats and segment_stats of ReadOnlyEngine {pull}53345[#53345] (issues: {issue}51303[#51303], {issue}51331[#51331])
448448
* Do not wrap soft-deletes reader for segment stats {pull}51331[#51331] (issues: {issue}51192[#51192], {issue}51303[#51303])
449449
* Account soft-deletes in FrozenEngine {pull}51192[#51192] (issue: {issue}50775[#50775])
450+
* Fixed an index corruption bug that would occur when applying deletes or updates on an index after it has been shrunk. More details can be found on the https://issues.apache.org/jira/browse/LUCENE-9300[corresponding issue].
450451

451452
Features/CAT APIs::
452453
* Fix NPE in RestPluginsAction {pull}52620[#52620] (issue: {issue}45321[#45321])

docs/reference/release-notes/highlights-7.7.0.asciidoc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,23 @@
77
//NOTE: The notable-highlights tagged regions are re-used in the
88
//Installation and Upgrade Guide
99

10+
// tag::notable-highlights[]
11+
[float]
12+
=== Fixed index corruption on shrunk indices
13+
14+
Applying deletes or updates on an index after it had been shrunk would likely
15+
corrupt the index. We advise users of Elasticsearch 6.x who opt in for soft
16+
deletes on some of their indices and all users of Elasticsearch 7.x to upgrade
17+
to 7.7 as soon as possible to no longer be subject to this corruption bug. In
18+
case upgrading in the near future is not an option, we recommend to completely
19+
stop using `_shrink` on read-write indices and to do a force-merge right after
20+
shrinking on read-only indices, which significantly reduces the likeliness of
21+
being affected by this bug in case deletes or updates get applied by mistake.
22+
This bug is fixed as of {es} 7.7.0. Low-level details can be found on the
23+
https://issues.apache.org/jira/browse/LUCENE-9300[corresponding issue].
24+
25+
// end::notable-highlights[]
26+
1027
// tag::notable-highlights[]
1128
[float]
1229
=== Significant reduction of heap usage of segments

0 commit comments

Comments
 (0)