Skip to content

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
jimczi committed Nov 6, 2024
1 parent c810058 commit edd38bb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1690,8 +1690,7 @@ public boolean isRecoverySourceEnabled() {
* @return Whether recovery source should always be bypassed in favor of using synthetic source.
*/
public boolean isRecoverySourceSyntheticEnabled() {
return version.onOrAfter(IndexVersions.USE_SYNTHETIC_SOURCE_FOR_RECOVERY)
&& recoverySourceSyntheticEnabled;
return version.onOrAfter(IndexVersions.USE_SYNTHETIC_SOURCE_FOR_RECOVERY) && recoverySourceSyntheticEnabled;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3157,7 +3157,7 @@ public Translog.Snapshot newChangesSnapshot(
try {
final Translog.Snapshot snapshot;
if (engineConfig.getMapperService().mappingLookup().isSourceSynthetic()
&& engineConfig.getIndexSettings().isRecoverySourceSyntheticEnabled()) {
&& engineConfig.getIndexSettings().isRecoverySourceSyntheticEnabled()) {
snapshot = new LuceneSyntheticSourceChangesSnapshot(
engineConfig.getMapperService().mappingLookup(),
searcher,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,7 @@ public void testRecoverySourceWithSyntheticSource() throws IOException {
assertThat(doc.rootDoc().getField("_recovery_source").binaryValue(), equalTo(new BytesRef("{\"field1\":\"value1\"}")));
}
{
Settings settings = Settings.builder()
.put(IndexSettings.RECOVERY_SOURCE_SYNTHETIC_ENABLED_SETTING.getKey(), true)
.build();
Settings settings = Settings.builder().put(IndexSettings.RECOVERY_SOURCE_SYNTHETIC_ENABLED_SETTING.getKey(), true).build();
MapperService mapperService = createMapperService(
settings,
topMapping(b -> b.startObject(SourceFieldMapper.NAME).field("mode", "synthetic").endObject())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,7 @@ public static void assertConsistentHistoryBetweenTranslogAndLuceneIndex(Engine e
assertThat(luceneOp.opType(), equalTo(translogOp.opType()));
if (luceneOp.opType() == Translog.Operation.Type.INDEX) {
if (engine.engineConfig.getMapperService().mappingLookup().isSourceSynthetic()
&& engine.engineConfig.getIndexSettings().isRecoverySourceSyntheticEnabled()) {
&& engine.engineConfig.getIndexSettings().isRecoverySourceSyntheticEnabled()) {
assertToXContentEquivalent(
((Translog.Index) luceneOp).source(),
((Translog.Index) translogOp).source(),
Expand Down

0 comments on commit edd38bb

Please sign in to comment.