From 627189bf3f3ad993d3399bbabe16a6e0b08088b2 Mon Sep 17 00:00:00 2001 From: Suraj Singh Date: Wed, 23 Aug 2023 22:04:03 -0700 Subject: [PATCH] Revert "Guarantee datasource read api is strong consistent read (#1815)" (#2013) This reverts commit f38ffed084cdcfc288eb32b35f3f3f1e5f5425d9. Signed-off-by: Suraj Singh --- .../storage/OpenSearchDataSourceMetadataStorage.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/datasources/src/main/java/org/opensearch/sql/datasources/storage/OpenSearchDataSourceMetadataStorage.java b/datasources/src/main/java/org/opensearch/sql/datasources/storage/OpenSearchDataSourceMetadataStorage.java index 4eb16924c4..3de924dcbb 100644 --- a/datasources/src/main/java/org/opensearch/sql/datasources/storage/OpenSearchDataSourceMetadataStorage.java +++ b/datasources/src/main/java/org/opensearch/sql/datasources/storage/OpenSearchDataSourceMetadataStorage.java @@ -224,9 +224,6 @@ private List searchInDataSourcesIndex(QueryBuilder query) { searchSourceBuilder.query(query); searchSourceBuilder.size(DATASOURCE_QUERY_RESULT_SIZE); searchRequest.source(searchSourceBuilder); - // strongly consistent reads is requred. more info - // https://github.com/opensearch-project/sql/issues/1801. - searchRequest.preference("_primary"); ActionFuture searchResponseActionFuture; try (ThreadContext.StoredContext ignored = client.threadPool().getThreadContext().stashContext()) {