Skip to content

Commit

Permalink
JVMCBC-1544: Pre-flight vector index check not working on upsertIndex
Browse files Browse the repository at this point in the history
The exception thrown by vectorIndexCheck() is being ignored.

Change-Id: I59d1d970e7c4c5dcfff7bf8583d320631b1a6da7
Reviewed-on: https://review.couchbase.org/c/couchbase-jvm-clients/+/212934
Reviewed-by: David Nault <[email protected]>
Tested-by: Build Bot <[email protected]>
  • Loading branch information
programmatix committed Jul 19, 2024
1 parent d5061ae commit ce6cfc0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public CompletableFuture<Void> upsertIndex(CoreSearchIndex index, CoreCommonOpti
Duration timeout = options.timeout().orElse(core.environment().timeoutConfig().managementTimeout());

return initialCheck(timeout)
.thenApply(ignore -> vectorIndexCheck(core, index, timeout))
.thenCompose(ignore -> vectorIndexCheck(core, index, timeout))
.thenCompose(ignore -> searchHttpClient.put(path(indexPath(index.name())), options)
.trace(TracingIdentifiers.SPAN_REQUEST_MS_UPSERT_INDEX)
.json(index.toJson().getBytes(UTF_8))
Expand Down

0 comments on commit ce6cfc0

Please sign in to comment.