From 6ef22cc0fead31610e1404f4bb111996fa2c65e7 Mon Sep 17 00:00:00 2001 From: Aditya <60684641+0x0elliot@users.noreply.github.com> Date: Mon, 29 Jun 2026 22:29:46 +0530 Subject: [PATCH] fix: refresh OpenSearch bulk writes for immediate read-after-write --- db-connector.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db-connector.go b/db-connector.go index 24dad359..abafea5f 100755 --- a/db-connector.go +++ b/db-connector.go @@ -15116,6 +15116,8 @@ func SetDatastoreKeyBulk(ctx context.Context, allKeys []CacheKeyData) ([]Datasto resp, err := project.Es.Bulk(ctx, opensearchapi.BulkReq{ Body: bytes.NewReader(buf.Bytes()), Index: strings.ToLower(GetESIndexPrefix(nameKey)), + // Refresh for immediate read-after-write; matches indexEs(). + Params: opensearchapi.BulkParams{Refresh: "true"}, }) res := resp.Inspect().Response