Skip to content

Commit e7fb0cd

Browse files
author
Sannikov Ilya
committed
Update to version v5.11.0
1 parent 226bca1 commit e7fb0cd

File tree

229 files changed

+4960
-3997
lines changed

Some content is hidden

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

229 files changed

+4960
-3997
lines changed

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.10.0"
5+
const ReindexerVersion = "v5.11.0"
66

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

changelog.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,36 @@
1+
# Version 5.11.0 (06.02.2026)
2+
## Core
3+
- [fea] Optimized indexes memory layout for namespaces with large amount of items. Index `IdSet`-structures now produce noticeably less overhead
4+
- [fea] Added support for `JOIN` on `composite`-indexes (i.e. queries like `SELECT * FROM ns1 INNER JOIN (SELECT * ns2) ON ns1.composite = ns2.composite`)
5+
- [fea] Added support for [serial()/now() precepts](readme.md#atomic-on-update-functions) with non-indexed fields
6+
- [fea] Added more optimal `preselect` for `JOIN`-queries in cases, when right namespace is small and right query does not have filtering conditions with `IdSets`
7+
- [fea] Added new `EXPLAIN` format for `SELECT`-queries with [MERGE](fulltext.md#merging-queries-results). Now it contains aggregated timing information and separate explains for each query
8+
- [fix] Fixed [serial()/now() precepts](readme.md#atomic-on-update-functions) with indexed fields, when target `jsonpath` is missing in document
9+
- [fix] Fixed `UPDATE`-queries for indexed fields, when target `jsonpath` is missing in document
10+
- [fix] Fixed indexing of empty arrays after `UPDATE`-queries: previously those arrays won't be selected by `IS NULL` condition
11+
- [fix] Fixed memory leak in `composite`-indexes after particular item update via `UPDATE` query
12+
- [fix] Fixed `UPDATE DROP` for `composite`-index parts, when `jsonpath` of subindex has nested field
13+
- [fix] Fixed `UPDATE`-query interaction with `null`-fields
14+
- [fix] Fixed handling for duplicate `sparse`-indexes in [DISTINCT](readme.md#aggregations) with multiple fields
15+
- [fix] Fixed storage data migration after `Primary key` index update
16+
17+
## Fulltext
18+
- [fea] Changed indexing structure for [typos handling](fulltext.md#typos-algorithm). New structure has noticeably less memory consumation
19+
- [fea] Added support for `ORDER BY ft_composite` created over non-indexed fields
20+
- [fix] Fixed few incorrect interactions between `UPDATE`-queries and `text composite` index with `null`/missing fields
21+
22+
## Vector indexes
23+
- [fix] Fixed situation, when some row IDs in `KNN` results with `range search` could be incorrect (due to missing internal/external index mapping)
24+
25+
## Reindexer server
26+
- [fix] Fixed QPS in [Prometheus-metrics](cpp_src/readme.md#prometheus-server-side) for `SELECT`-queries (after `5.9.0` it was always equal to `UPDATE`-queries QPS)
27+
- [fix] Fixed `columns` list content in HTTP query results response (now it will contain full list of existing columns)
28+
29+
## Face
30+
- [fea] Removed autocomplete from index fields for create/edit index forms
31+
- [fea] Added caching of added float vector data config
32+
- [fea] Deleted `is_appendable` field from index config
33+
134
# Version 5.10.0 (29.12.2025)
235
## Core
336
- [fea] Added [filtering by field length](readme.md#functions)

cpp_src/CMakeLists.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ else()
6767
option(LINK_RESOURCES "Link web resources as binary data" ON)
6868
endif()
6969

70-
set (REINDEXER_VERSION_DEFAULT "5.10.0")
70+
set (REINDEXER_VERSION_DEFAULT "5.11.0")
7171

7272
if(NOT CMAKE_BUILD_TYPE)
7373
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
@@ -89,13 +89,19 @@ if(MSVC)
8989
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -Zi")
9090
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG -Zi")
9191
set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG -Zi")
92-
elseif(WITH_ASAN OR WITH_STDLIB_DEBUG)
92+
elseif(WITH_ASAN)
9393
# Using O2 instead of O3 to build a bit faster
9494
# Also this allows to avoid SEGFAULT in libasan.so during coroutines interaction on CentOS7 (gcc-12).
9595
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g1")
9696
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g1")
9797
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
9898
set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG")
99+
elseif(WITH_STDLIB_DEBUG)
100+
# Using Os instead of O3 to build a bit faster and get smaller artifacts size
101+
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Os -g1")
102+
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-Os -g1")
103+
set(CMAKE_CXX_FLAGS_RELEASE "-Os -DNDEBUG")
104+
set(CMAKE_C_FLAGS_RELEASE "-Os -DNDEBUG")
99105
else()
100106
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g1")
101107
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -g1")
@@ -316,7 +322,7 @@ endif()
316322

317323
if(WITH_DEBUG_CONTAINERS OR WITH_STDLIB_DEBUG)
318324
message("Building reindexer with debug containers")
319-
add_definitions(-DREINDEX_DEBUG_CONTAINERS)
325+
add_definitions(-DREINDEX_DEBUG_CONTAINERS=1)
320326
endif()
321327

322328
include_directories(${REINDEXER_SOURCE_PATH})

cpp_src/client/coroqueryresults.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ int CoroQueryResults::Iterator::GetNSID() {
470470
return itemParams_.nsid;
471471
}
472472

473-
int CoroQueryResults::Iterator::GetID() {
473+
IdType CoroQueryResults::Iterator::GetID() {
474474
readNext();
475475
return itemParams_.id;
476476
}

cpp_src/client/coroqueryresults.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class [[nodiscard]] CoroQueryResults {
7373
Item GetItem();
7474
lsn_t GetLSN();
7575
int GetNSID();
76-
int GetID();
76+
IdType GetID();
7777
int GetShardID();
7878
RankT GetRank();
7979
bool IsRanked() noexcept;

cpp_src/client/item.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <memory>
44
#include <string_view>
55
#include <vector>
6+
#include "core/id_type.h"
67
#include "tools/errors.h"
78
#include "tools/lsn.h"
89

@@ -75,7 +76,7 @@ class [[nodiscard]] Item {
7576
Error Status() const noexcept { return status_; }
7677
/// Get internal ID of item
7778
/// @return ID of item
78-
int GetID() const noexcept { return id_; }
79+
IdType GetID() const noexcept { return id_; }
7980
/// Get LSN of item
8081
/// @return LSN of item
8182
lsn_t GetLSN() const noexcept { return lsn_; }
@@ -106,13 +107,13 @@ class [[nodiscard]] Item {
106107
private:
107108
explicit Item(ItemImplBase* impl);
108109
explicit Item(Error err);
109-
void setID(int id) noexcept { id_ = id; }
110+
void setID(IdType id) noexcept { id_ = id; }
110111
void setLSN(lsn_t lsn) noexcept { lsn_ = lsn; }
111112
void setShardID(int shardId) noexcept { shardId_ = shardId; }
112113

113114
std::unique_ptr<ItemImplBase> impl_;
114115
Error status_;
115-
int id_ = -1;
116+
IdType id_ = IdType::NotSet();
116117
lsn_t lsn_;
117118
int shardId_ = ShardingKeyType::ProxyOff;
118119
friend class client::RPCClient;

cpp_src/client/itemimplbase.cc

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@ void ItemImplBase::FromCJSON(std::string_view slice) {
3434
}
3535

3636
Payload pl = GetPayload();
37-
CJsonDecoder decoder(tagsMatcher_, holder_);
37+
ScalarIndexesSetT objectScalarIndexes;
38+
CJsonDecoder decoder(pl, rdser, ser_, tagsMatcher_, holder_, floatVectorsHolder_, objectScalarIndexes);
3839
ser_.Reset();
3940
try {
40-
decoder.Decode(pl, rdser, ser_, floatVectorsHolder_, CJsonDecoder::DefaultFilter{nullptr});
41+
decoder.Decode(CJsonDecoder::DefaultFilter{nullptr});
4142
} catch (const Error& e) {
4243
if (!hasBundledTm) {
4344
const auto err = tryToUpdateTagsMatcher();
@@ -46,8 +47,8 @@ void ItemImplBase::FromCJSON(std::string_view slice) {
4647
}
4748
ser_.Reset();
4849
rdser.SetPos(0);
49-
CJsonDecoder decoderSecondAttempt(tagsMatcher_, holder_);
50-
decoderSecondAttempt.Decode(pl, rdser, ser_, floatVectorsHolder_, CJsonDecoder::DefaultFilter{nullptr});
50+
CJsonDecoder decoderSecondAttempt(pl, rdser, ser_, tagsMatcher_, holder_, floatVectorsHolder_, objectScalarIndexes);
51+
decoderSecondAttempt.Decode(CJsonDecoder::DefaultFilter{nullptr});
5152
}
5253
}
5354

@@ -85,11 +86,13 @@ Error ItemImplBase::FromJSON(std::string_view slice, char** endp, bool /*pkOnly*
8586
return Error(errParseJson, "Error parsing json: '{}', pos: {}", e.what(), len);
8687
}
8788

89+
ScalarIndexesSetT objectScalarIndexes;
8890
// Split parsed json into indexes and tuple
89-
JsonDecoder decoder(tagsMatcher_);
91+
JsonDecoder decoder(tagsMatcher_, floatVectorsHolder_, objectScalarIndexes);
9092
Payload pl = GetPayload();
9193
ser_.Reset();
92-
auto err = decoder.Decode(pl, ser_, node.value, floatVectorsHolder_);
94+
95+
auto err = decoder.Decode(pl, ser_, node.value);
9396

9497
if (err.ok()) {
9598
// Put tuple to field[0]
@@ -103,7 +106,6 @@ Error ItemImplBase::FromJSON(std::string_view slice, char** endp, bool /*pkOnly*
103106

104107
Error ItemImplBase::FromMsgPack(std::string_view buf, size_t& offset) {
105108
Payload pl = GetPayload();
106-
MsgPackDecoder decoder(tagsMatcher_);
107109

108110
std::string_view data = buf;
109111
if (!unsafe_) {
@@ -112,7 +114,9 @@ Error ItemImplBase::FromMsgPack(std::string_view buf, size_t& offset) {
112114
}
113115

114116
ser_.Reset();
115-
Error err = decoder.Decode(data, pl, ser_, offset, floatVectorsHolder_);
117+
ScalarIndexesSetT objectScalarIndexes;
118+
MsgPackDecoder decoder(data, pl, ser_, tagsMatcher_, offset, floatVectorsHolder_, objectScalarIndexes);
119+
Error err = decoder.Decode();
116120
if (err.ok()) {
117121
const auto tupleSize = ser_.Len();
118122
tupleHolder_ = ser_.DetachBuf();

cpp_src/client/resultserializer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ ResultSerializer::ItemParams ResultSerializer::GetItemData(int flags, int shardI
129129
ItemParams ret;
130130

131131
if (flags & kResultsWithItemID) {
132-
ret.id = int(GetVarUInt());
132+
ret.id = IdType::FromNumber(GetVarUInt());
133133
ret.lsn = lsn_t(GetVarUInt());
134134
}
135135

cpp_src/client/resultserializer.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
#pragma once
22
#include <functional>
33
#include <optional>
4+
#include "core/id_type.h"
45
#include "core/namespace/incarnationtags.h"
56
#include "core/queryresults/aggregationresult.h"
67
#include "core/rank_t.h"
8+
#include "core/type_consts.h"
79
#include "tools/lsn.h"
810
#include "tools/serializer.h"
911

@@ -28,7 +30,7 @@ class [[nodiscard]] ResultSerializer : public Serializer {
2830
};
2931

3032
struct [[nodiscard]] ItemParams {
31-
IdType id = -1;
33+
IdType id = IdType::NotSet();
3234
uint16_t nsid = 0;
3335
RankT rank{};
3436
lsn_t lsn;

cpp_src/cluster/clusterizator.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ bool ClusterManager::NamesapceIsInReplicationConfig(std::string_view nsName) {
115115
return clusterReplicator_.NamespaceIsInClusterConfig(nsName) || asyncReplicator_.NamespaceIsInAsyncConfig(nsName);
116116
}
117117

118-
Error ClusterManager::Replicate(UpdatesContainer&& recs, std::function<void()> beforeWaitF, const RdxContext& ctx) {
118+
Error ClusterManager::Replicate(UpdatesContainer&& recs, const std::function<void()>& beforeWaitF, const RdxContext& ctx) {
119119
if (replicationIsNotRequired(recs)) {
120120
return {};
121121
}

0 commit comments

Comments
 (0)