diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 745ce057..ddeabe35 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,7 @@ on: jobs: build: strategy: + fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] java: [11, 17] diff --git a/src/main/java/org/opensearch/jobscheduler/sweeper/JobSweeper.java b/src/main/java/org/opensearch/jobscheduler/sweeper/JobSweeper.java index 9fdcd0fa..e2bb077c 100644 --- a/src/main/java/org/opensearch/jobscheduler/sweeper/JobSweeper.java +++ b/src/main/java/org/opensearch/jobscheduler/sweeper/JobSweeper.java @@ -389,7 +389,7 @@ private void sweepShard(ShardId shardId, ShardNodes shardNodes, String startAfte String searchAfter = startAfter == null ? "" : startAfter; while (searchAfter != null) { SearchRequest jobSearchRequest = new SearchRequest().indices(shardId.getIndexName()) - .preference("_shards:" + shardId.id() + "|_only_local") + .preference("_shards:" + shardId.id() + "|_primary") .source( new SearchSourceBuilder().version(true) .seqNoAndPrimaryTerm(true)