Skip to content

Commit d640dd5

Browse files
committed
Upgrade Couchbase Java SDK to 3.12.1
Signed-off-by: Emilien Bevierre <emilien.bevierre@couchbase.com>
1 parent 3cd9c0d commit d640dd5

6 files changed

Lines changed: 8 additions & 8 deletions

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</parent>
1919

2020
<properties>
21-
<couchbase>3.11.3</couchbase>
21+
<couchbase>3.12.1</couchbase>
2222
<springdata.commons>4.2.0-SNAPSHOT</springdata.commons>
2323
<java-module-name>spring.data.couchbase</java-module-name>
2424
<hibernate.validator>7.0.1.Final</hibernate.validator>

src/main/java/org/springframework/data/couchbase/core/ReactiveFindByIdOperationSupport.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public Mono<T> one(final Object id) {
131131
}
132132
} else {
133133
rejectInvalidTransactionalOptions();
134-
return ctxOpt.get().getCore().get(makeCollectionIdentifier(rc.async()), id.toString())
134+
return ctxOpt.get().getCore().getReactive(makeCollectionIdentifier(rc.async()), id.toString())
135135
.flatMap(result -> support.decodeEntity(id, result.contentAsBytes(),
136136
result.cas(), null, domainType, pArgs.getScope(), pArgs.getCollection(), null,
137137
null));

src/main/java/org/springframework/data/couchbase/core/ReactiveFindByQueryOperationSupport.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ public Flux<T> all() {
209209
JsonSerializer jSer = clientFactory.getCluster().environment().jsonSerializer();
210210
CoreQueryOptions opts = options != null ? options.builder().build() : null;
211211
return s.get().getCore()
212-
.queryBlocking(statement,
212+
.queryReactive(statement,
213213
pArgs.getScope() == null ? null
214214
: CoreQueryContext.of(rs.bucketName(), pArgs.getScope()),
215215
opts, false)
@@ -278,7 +278,7 @@ public Mono<Long> count() {
278278
JsonSerializer jSer = clientFactory.getCluster().environment().jsonSerializer();
279279
CoreQueryOptions opts = options != null ? options.builder().build() : null;
280280
return s.get().getCore()
281-
.queryBlocking(statement,
281+
.queryReactive(statement,
282282
pArgs.getScope() == null ? null
283283
: CoreQueryContext.of(rs.bucketName(), pArgs.getScope()),
284284
opts, false)

src/main/java/org/springframework/data/couchbase/core/ReactiveRemoveByIdOperationSupport.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,15 @@ public Mono<RemoveResult> one(final Object id) {
117117
throw new IllegalArgumentException("cas must be supplied for tx remove");
118118
}
119119
CoreTransactionAttemptContext ctx = s.get().getCore();
120-
Mono<CoreTransactionGetResult> gr = ctx.get(makeCollectionIdentifier(rc.async()), id.toString());
120+
Mono<CoreTransactionGetResult> gr = ctx.getReactive(makeCollectionIdentifier(rc.async()), id.toString());
121121

122122
return gr.flatMap(getResult -> {
123123
if (getResult.cas() != cas) {
124124
return Mono.error(TransactionalSupport.retryTransactionOnCasMismatch(ctx, getResult.cas(), cas));
125125
}
126126
CoreTransactionAttemptContext internal = ctx;
127127
RequestSpan span = CbTracing.newSpan(internal.core().context(), TRANSACTION_OP_REMOVE, internal.span());
128-
return ctx.remove(getResult, new SpanWrapper(span)).map(r -> new RemoveResult(id.toString(), 0, null));
128+
return ctx.removeReactive(getResult, new SpanWrapper(span)).map(r -> new RemoveResult(id.toString(), 0, null));
129129
});
130130

131131
}

src/main/java/org/springframework/data/couchbase/core/ReactiveRemoveByQueryOperationSupport.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public Flux<RemoveResult> all() {
101101
.buildTransactionQueryOptions(buildQueryOptions(pArgs.getOptions()));
102102
CoreQueryContext queryContext = OptionsBuilder.queryContext(pArgs.getScope(), pArgs.getCollection(), rs.bucketName());
103103
return transactionContext.get().getCore()
104-
.queryBlocking(statement, queryContext, opts.builder().build(), false)
104+
.queryReactive(statement, queryContext, opts.builder().build(), false)
105105
.flatMapIterable(result -> result.collectRows()).map(row -> {
106106
JsonObject json = JsonObject.fromJson(row.data());
107107
return new RemoveResult(json.getString(TemplateUtils.SELECT_ID), json.getLong(TemplateUtils.SELECT_CAS),

src/main/java/org/springframework/data/couchbase/core/ReactiveReplaceByIdOperationSupport.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public Mono<T> one(T object) {
125125
CoreTransactionAttemptContext ctx = ctxOpt.get().getCore();
126126
ctx.logger().info(ctx.attemptId(), "refetching %s for Spring replace",
127127
DebugUtil.docId(collId, converted.getId().toString()));
128-
Mono<CoreTransactionGetResult> gr = ctx.get(collId, converted.getId().toString());
128+
Mono<CoreTransactionGetResult> gr = ctx.getReactive(collId, converted.getId().toString());
129129

130130
return gr.flatMap(getResult -> {
131131
if (getResult.cas() != cas) {

0 commit comments

Comments
 (0)