Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
- Upgrade TQE to v3.5.0.
- Extract `ObjectMapper` to a static field in the test `tdg.Utils` helper to avoid recreating it on every `sendUsers`/`getUsers` call.

### Client

- Append a default opts map to the varargs `upsert`/`upsertObject` calls so the request reaches the CRUD rock as the 4-arg form; CRUD 1.5.0+'s conditions parser rejects the legacy 3-arg form with `ParseConditionError`.

### Documentation

- Document supported Java types for Tarantool data mapping in `tuple_pojo_mapping` docs (RU/EN), including Tarantool extension types (`decimal`, `uuid`, `datetime`, `interval`, `tuple`) and related mapping notes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -726,12 +726,14 @@ public <T> CompletableFuture<Tuple<T>> update(

@Override
public CompletableFuture<Void> upsert(Options options, Object... arguments) {
return crudCallSingleResult(options, CRUD_UPSERT, arguments).thenAccept((r) -> {});
Object[] args = ensureOpts(arguments, DEFAULT_UPDATE_OPTIONS.getOptions());
return crudCallSingleResult(options, CRUD_UPSERT, args).thenAccept((r) -> {});
}

@Override
public CompletableFuture<Void> upsertObject(Options options, Object... arguments) {
return crudCallSingleResult(options, CRUD_UPSERT_OBJECT, arguments).thenAccept((r) -> {});
Object[] args = ensureOpts(arguments, DEFAULT_UPDATE_OPTIONS.getOptions());
return crudCallSingleResult(options, CRUD_UPSERT_OBJECT, args).thenAccept((r) -> {});
}

@Override
Expand Down Expand Up @@ -897,6 +899,14 @@ private Object[] toTupleOperationsOptsArgs(
return new Object[] {tuple, operations, options.getOptions()};
}

// CRUD 1.5.0+ needs an opts table; append a default one when the caller didn't supply it.
private static Object[] ensureOpts(Object[] args, Map<String, Object> defaultOpts) {
if (args.length > 0 && args[args.length - 1] instanceof Map) return args;
Object[] withOpts = Arrays.copyOf(args, args.length + 1);
withOpts[args.length] = defaultOpts;
return withOpts;
}

/**
* Converts key, operations and options to array of arguments.
*
Expand Down
3 changes: 0 additions & 3 deletions tarantool-shared-resources/vshard_cluster/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ WORKDIR "$TARANTOOL_WORKDIR/$APP_NAME"
RUN mkdir -p /etc/tarantool/instances.enabled && \
ln -s "$TARANTOOL_WORKDIR/$APP_NAME" /etc/tarantool/instances.enabled/app

RUN sed -i 's|http://archive.ubuntu.com/ubuntu/|http://mirror.yandex.ru/ubuntu/|g; s|http://security.ubuntu.com/ubuntu/|http://mirror.yandex.ru/ubuntu/|g' /etc/apt/sources.list

# install dependencies
RUN apt-get -y update && \
apt-get -y install build-essential cmake make gcc git unzip && \
apt-get -y clean
Expand Down
Loading