Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions docs/changelog/136279.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 136279
summary: Initialize `TermsEnum` eagerly
area: Search
type: bug
issues: []
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.core.LoggerContext;
import org.apache.logging.log4j.core.config.Configurator;
import org.apache.lucene.index.TermsEnum;
import org.apache.lucene.util.Constants;
import org.apache.lucene.util.StringHelper;
import org.apache.lucene.util.VectorUtil;
Expand Down Expand Up @@ -202,6 +203,8 @@ private static void initPhase2(Bootstrap bootstrap) throws IOException {
IfConfig.logIfNecessary();

ensureInitialized(
// See https://github.com/elastic/elasticsearch/issues/136268
TermsEnum.class,
// ReleaseVersions does nontrivial static initialization which should always succeed but load it now (before SM) to be sure
ReleaseVersions.class,
// ReferenceDocs class does nontrivial static initialization which should always succeed but load it now (before SM) to be sure
Expand Down