Commit 4e0d6d3
authored
Correctly resolve type for delete operations (#72809)
#62616 refactored how we deal with building mapping updates for
delete operations against an empty index. In 7x, delete operations
include a type as part of the operation UID, and this type needs to
be resolved against mappings. In particular, the type _doc can
mean either a type called _doc (the general case), or it can mean
whatever type this index actually has. There are two code paths
in IndexShard.applyDeleteOperation, one for empty mappings
and one for the standard case; #62616 was resolving the type for
the first code path, but not the second, which meant that some
delete operations could be written to the translog with an incorrect
type.
This commit adds type resolution to the second code path as well.
Fixes #727351 parent d3c26fd commit 4e0d6d3
File tree
1 file changed
+2
-1
lines changed- server/src/main/java/org/elasticsearch/index/shard
1 file changed
+2
-1
lines changedLines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
980 | 980 | | |
981 | 981 | | |
982 | 982 | | |
983 | | - | |
| 983 | + | |
984 | 984 | | |
| 985 | + | |
985 | 986 | | |
986 | 987 | | |
987 | 988 | | |
| |||
0 commit comments