Skip to content

Commit

Permalink
Fix IT failures
Browse files Browse the repository at this point in the history
Signed-off-by: Ashish Singh <ssashish@amazon.com>
  • Loading branch information
ashking94 committed Nov 21, 2022
1 parent 46903d5 commit 4f6b1a7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ public synchronized IndexShard createShard(
retentionLeaseSyncer,
circuitBreakerService,
// TODO Replace with remote translog factory in the follow up PR
new InternalTranslogFactory(),
this.indexSettings.isRemoteTranslogStoreEnabled() ? null : new InternalTranslogFactory(),
this.indexSettings.isSegRepEnabled() ? checkpointPublisher : null,
remoteStore
);
Expand Down
3 changes: 1 addition & 2 deletions server/src/main/java/org/opensearch/index/IndexSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -1001,8 +1001,7 @@ public boolean isRemoteStoreEnabled() {
* Returns if remote translog store is enabled for this index.
*/
public boolean isRemoteTranslogStoreEnabled() {
// return isRemoteTranslogStoreEnabled;
return isSegRepEnabled();
return isRemoteTranslogStoreEnabled;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
import org.opensearch.common.util.set.Sets;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Set;
Expand Down Expand Up @@ -68,7 +67,7 @@ public ReplicationGroup(
boolean remoteTranslogEnabled
) {
if (!remoteTranslogEnabled) {
assert trackedAllocationIds.equals(localTranslogAllocationIds)
assert localTranslogAllocationIds.containsAll(trackedAllocationIds)
: "In absence of remote translog store, all tracked shards must have local translog store";
}
this.routingTable = routingTable;
Expand Down Expand Up @@ -125,7 +124,7 @@ public ReplicationGroup(
Set<String> trackedAllocationIds,
long version
) {
this(routingTable, inSyncAllocationIds, trackedAllocationIds, Collections.emptySet(), version, false);
this(routingTable, inSyncAllocationIds, trackedAllocationIds, trackedAllocationIds, version, false);
}

public long getVersion() {
Expand Down

0 comments on commit 4f6b1a7

Please sign in to comment.