Skip to content

Commit a828699

Browse files
committed
Update to version v5.12.1
1 parent 2eef2e6 commit a828699

44 files changed

Lines changed: 709 additions & 950 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bindings/consts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package bindings
22

33
const CInt32Max = int(^uint32(0) >> 1)
44

5-
const ReindexerVersion = "v5.12.0"
5+
const ReindexerVersion = "v5.12.1"
66

77
// public go consts from type_consts.h and reindexer_ctypes.h
88
const (

changelog.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,27 @@
1+
# Version 5.12.1 (03.04.2026)
2+
## Core
3+
- [fix] Fixed crash during error handling in `IndexUpdate` when PK is missing
4+
- [fix] Fixed `composite` values validation in `ALLSET` operator
5+
- [fix] Fixed `composite` indexes error handling in [equal_position](readme.md#search-in-array-fields-with-matching-indexes)
6+
- [fix] Fixed negative radius validation in `DWithin` condition for [geo index](readme.md#geometry)
7+
8+
## Vector indexes
9+
- [fix] Fixed disk ANN cache for `composite` primary keys. Previously it could lead to crash on startup
10+
- [fix] Fixed KNN search with radius for [quantized HNSW index](float_vector.md#quantization-configuration-for-hnsw-index)
11+
12+
## Go connector
13+
- [fix] Fixed type tags handling for empty slices
14+
115
# Version 5.12.0 (20.03.2026)
216
## Core
317
- [fea] Added [now()-function](readme.md#nowunit) support into `WHERE`-clause. Now it may be used both in `UPDATE SET` and `WHERE` clauses
418
- [fea] Added [flat_array_len()-function](readme.md#flat_array_lenfield_name) into `UPDATE SET`. Now it may be used both in `UPDATE SET` and `WHERE` clauses
519
- [fea] Added `checksum` field into `#memstats`-namespaces as better alternative for `datahash`
620
- [fea] Changed [grouping logic for equal_position](readme.md#search-in-array-fields-with-matching-indexes-using-grouping). New syntax/logic has better match with standard json-paths and also supports nested arrays in explicit way
7-
- [fix] Fixed possible memory leak during `composite`-indexes substitution inside WHERE-clauses (in cases, when `int`->`string` convertion was performed before `composite` substitution)
21+
- [fix] Fixed possible memory leak during `composite`-indexes substitution inside WHERE-clauses (in cases, when `int`->`string` conversion was performed before `composite` substitution)
822
- [fix] Fixed SQL parsing for queries with combination of `or inner join(...)` and `left join(...)`
923
- [fix] Fixed storage data migration, when Primary key index was changed
10-
- [fix] Fixed `2D points` convertion on WHERE-clause (perviously it could led to crashes on assertion)
24+
- [fix] Fixed `2D points` conversion on WHERE-clause (previously it could lead to crashes on assertion)
1125
- [fix] Added explicit check for `rtree` Primary keys. [Geo-indexes](readme.md#geometry) can not be PK anymore
1226
- [fix] Fixed [forced sort](readme.md#forced-sort) errors handling for [KNN-queries](float_vector.md), when query has `LIMIT` and `OFFSET`
1327
- [fix] Fixed `UUID`->`string` conversions for nested arrays on `UUID`-index deletion
@@ -64,7 +78,7 @@
6478
- [fix] Fixed storage data migration after `Primary key` index update
6579

6680
## Fulltext
67-
- [fea] Changed indexing structure for [typos handling](fulltext.md#typos-algorithm). New structure has noticeably less memory consumation
81+
- [fea] Changed indexing structure for [typos handling](fulltext.md#typos-algorithm). New structure has noticeably less memory consumption
6882
- [fea] Added support for `ORDER BY ft_composite` created over non-indexed fields
6983
- [fix] Fixed few incorrect interactions between `UPDATE`-queries and `text composite` index with `null`/missing fields
7084

@@ -91,7 +105,7 @@
91105
- [fix] Fixed multiple issues with `collate numeric` [index option](readme.md#index-types-and-their-capabilities): `null`-values handling and space characters handling
92106
- [fix] Fixed original strings content preservation for `collate ascii` and `collate utf-8` (previously those strings could be normalized)
93107
- [fix] Disabled invalid config with multiple `jsonpaths` for [geo indexes](readme.md#geometry)
94-
- [fix] Fixed `update drop` for heterogenious arrays with `sparse`-indexes
108+
- [fix] Fixed `update drop` for heterogeneous arrays with `sparse`-indexes
95109
- [fix] Fixed array fields rollback for unsuccessful [update-queries](readme.md#update-queries) in some corner cases
96110

97111
## Fulltext
@@ -248,7 +262,7 @@
248262
- [fea] Added proxying for UPDATE and DELETE queries with subqueries and inner joins
249263

250264
## Reindexer tool
251-
- [fea] Added [storage convertion tool](cpp_src/readme.md#converting-storage-type-for-existing-database)
265+
- [fea] Added [storage conversion tool](cpp_src/readme.md#converting-storage-type-for-existing-database)
252266

253267
## Deploy
254268
- [upd] Added deployment for `debian:13` (trixie)

cjson/decoder.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,10 @@ func (dec *Decoder) decodeSlice(pl *payloadIface, rdser *Serializer, v *reflect.
375375
}
376376
}
377377

378+
if count == 0 {
379+
return
380+
}
381+
378382
if subtag != TAG_OBJECT {
379383
k := v.Type().Elem().Kind()
380384
isPtr := false

cpp_src/cluster/config.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ Error NodeData::FromJSON(std::span<char> json) {
3131
} catch (const Error& err) {
3232
return err;
3333
}
34-
return {};
3534
}
3635

3736
Error NodeData::FromJSON(const gason::JsonNode& root) {
@@ -67,7 +66,6 @@ Error RaftInfo::FromJSON(std::span<char> json) {
6766
} catch (const Error& err) {
6867
return err;
6968
}
70-
return {};
7169
}
7270

7371
Error RaftInfo::FromJSON(const gason::JsonNode& root) {
@@ -1003,7 +1001,7 @@ Error ShardingConfig::FromJSON(const gason::JsonNode& root) {
10031001
} catch (const Error& err) {
10041002
return err;
10051003
} catch (const gason::Exception& ex) {
1006-
return Error(errParseJson, "NodeData: {}", ex.what());
1004+
return Error(errParseJson, "ShardingConfig: {}", ex.what());
10071005
}
10081006
return Validate();
10091007
}

cpp_src/cluster/replication/replicationthread.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,7 @@ Error ReplThread<BehaviourParamT>::syncNamespace(Node& node, const NamespaceName
772772
} else if (requiredLsn.LSN() == localLsn.LSN() && !followerState.dataHash.IsEqualByAnyVersionTo(localState.dataHash)) {
773773
logWarn("{}:{}:{} Datahash missmatch. Expected: {}, actual: {}", serverId_, node.uid, nsName, localState.dataHash,
774774
followerState.dataHash);
775+
assertrx_dbg(0 && "Does not expect checksum missmatch in debug build");
775776
requiredLsn = ExtendedLsn();
776777
}
777778
}

cpp_src/cmd/reindexer_server/contrib/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ RUN mkdir build && \
3131

3232
FROM alpine:3.22
3333

34-
ARG RX_VERSION=v5.12.0
34+
ARG RX_VERSION=v5.12.1
3535

3636
COPY --from=build /usr/local /usr/local
3737
COPY --from=build /entrypoint.sh /entrypoint.sh

cpp_src/cmd/reindexer_tool/readme.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Reindexer command line tool
2-
Reindexer command line tool is an client utility to work with database.
2+
Reindexer command line tool is a client utility to work with the database.
33

4-
## Table of Content
4+
## Table of contents
55

66
- [Features](#features)
77
- [Usage](#usage)
@@ -13,7 +13,7 @@ Reindexer command line tool is an client utility to work with database.
1313
- Backup whole database into text file or console.
1414
- Make queries to database
1515
- Modify documents and DB metadata
16-
- Both standalone and embeded(builtin) modes are supported
16+
- Both standalone and embedded (builtin) modes are supported
1717

1818
## Usage
1919

@@ -69,9 +69,9 @@ Options
6969

7070
### Dump modes
7171

72-
There are few different dump modes to interract with sharded databases:
72+
There are a few different dump modes to interact with sharded databases:
7373
1. full_node - Default mode. Dumps all data of chosen node, including sharded namespaces. However, does not dump data from other shards.
74-
2. sharded_only - Dumps data from sharded namespaces only (including the data from all other shards). May be usefull for resharding.
74+
2. sharded_only - Dumps data from sharded namespaces only (including the data from all other shards). May be useful for resharding.
7575
3. local_only - Dumps data from local namespaces, excluding sharded namespaces.
7676

7777
Dump mode is saved in the output file and will be used during restoration process.

cpp_src/core/cjson/readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

2-
`CJSON` (Compact JSON) is binary internal reindexer format for transparently representing JSON data.
3-
Each field of CJSON is encoded to `ctag` - varuint, which encodes type and name of field, and `data` binary representation of field data in format dependent of type.
2+
`CJSON` (Compact JSON) is a binary internal Reindexer format for transparently representing JSON data.
3+
Each field of CJSON is encoded to `ctag` — a varuint that encodes the type and name of the field, and `data`, the binary representation of field data in a format dependent on the type.
44

55

66
## Ctag format

cpp_src/core/expressiontree.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ class ExpressionTree;
1818
* `Ts...` - types of the expression arguments.
1919

2020
`ExpressionTree` does not support operator precedence.
21-
You can support it manually as it done in `QueryEntries` and `SelectIteratorContainer`, or by enclosing higher priority operators in brackets as it done in `SortExpression`.
22-
Here is not used the traditional way for constructing trees with inheritance of nodes, allocations of separate nodes and holding pointers to them.
21+
You can support it manually as is done in `QueryEntries` and `SelectIteratorContainer`, or by enclosing higher priority operators in brackets as is done in `SortExpression`.
22+
The traditional way of constructing trees with inheritance of nodes, allocations of separate nodes, and holding pointers to them is not used here.
2323
`ExpressionTree` holds all nodes by value in a vector (`container_`) sequentially in type `Node` based on `variant`.
2424

2525
Subtree is stored in `container_` just behind its head (`SubTree`) which holds occupied space. For details see examples.
@@ -39,7 +39,7 @@ would be stored like
3939

4040
Every cell holds an operator (here `+` or `-`) and payload.
4141

42-
Lets see cells 4-5: they correspond to subexpression `-(D + E)`.
42+
Let's look at cells 4-5: they correspond to subexpression `-(D + E)`.
4343
* Cell 4 is a head of subtree: `-` - operator before the bracket and `3` - count of cells occupied by subtree (from 4 to 6).
4444
* Cell 5 holds default operator `+` and value `D`.
4545
* Cell 6 holds operator `+` and value `E`.
@@ -50,7 +50,7 @@ This structure provides effective forward iteration and doesn't allow to iterate
5050

5151
Default building process of ExpressionTree is to append elements from beginning to end by using methods `Append()`, `OpenBracket()` and `CloseBracket()`.
5252
`activeBrackets_` - list of cells of heads of open brackets which sizes should be incremented when new element is added.
53-
Lets trace evolution of `container_` and `activeBrackets_` during construction expression `(A + B) - (C + (D - E) + F) - G`:
53+
Let's trace the evolution of `container_` and `activeBrackets_` while constructing the expression `(A + B) - (C + (D - E) + F) - G`:
5454
1. `OpenBracket(+)`. Constructed expression: `(`
5555

5656
| 0 |

cpp_src/core/index/float_vector/float_vector_index.cc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,4 +277,27 @@ void FloatVectorIndex::WriterBase::writePK(IdType id) {
277277
}
278278
}
279279

280+
IdType FloatVectorIndex::LoaderBase::readPKEncodedData(void* destBuf, Serializer& ser, std::string_view name, std::string_view idxType) {
281+
Variant key;
282+
if (!isCompositePK_) {
283+
key = ser.GetVariant();
284+
} else {
285+
VariantArray keyParts;
286+
const auto len = ser.GetVarUInt();
287+
if (!len) [[unlikely]] {
288+
throw Error(errLogic, "{}::LoadIndexCache:{}: serialized PK array is empty", idxType, name);
289+
}
290+
keyParts.reserve(len);
291+
for (size_t i = 0; i < len; ++i) {
292+
keyParts.emplace_back(ser.GetVariant());
293+
}
294+
key = Variant(keyParts);
295+
}
296+
const IdType itemID = getVectorData_(std::move(key), destBuf);
297+
if (!itemID.IsValid()) [[unlikely]] {
298+
throw Error(errLogic, "{}::LoadIndexCache:{}: unable to find indexed item with requested PK", idxType, name);
299+
}
300+
return itemID;
301+
}
302+
280303
} // namespace reindexer

0 commit comments

Comments
 (0)