Skip to content

Commit f814227

Browse files
committed
Update to version v4.20.0
1 parent 1c82af8 commit f814227

File tree

176 files changed

+3694
-3534
lines changed

Some content is hidden

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

176 files changed

+3694
-3534
lines changed

.github/workflows/install_grpc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
git clone --branch v1.44.0 https://github.com/grpc/grpc
3+
git clone --branch v1.54.3 https://github.com/grpc/grpc
44
cd grpc
55
git submodule update --init
66
mkdir -p cmake/build

.github/workflows/test.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,10 @@ jobs:
4747
build:
4848
strategy:
4949
matrix:
50-
os: [ubuntu-22.04, macos-13]
50+
os: [ubuntu-22.04, ubuntu-24.04, macos-13]
5151
include:
52-
- os: ubuntu-24.04
53-
cc: gcc-12
54-
cxx: g++-12
5552
- os: ubuntu-latest
5653
sanitizer: ASAN
57-
cc: gcc-10
58-
cxx: g++-10
5954
- os: ubuntu-latest
6055
sanitizer: TSAN
6156
cc: gcc-12
@@ -66,6 +61,7 @@ jobs:
6661
OS: ${{matrix.os}}
6762
CC: ${{matrix.cc}}
6863
CXX: ${{matrix.cxx}}
64+
SANITIZER: ${{matrix.sanitizer}}
6965
steps:
7066
- name: Checkout repository
7167
uses: actions/checkout@v4
@@ -85,7 +81,11 @@ jobs:
8581
export CPLUS_INCLUDE_PATH=$GITHUB_WORKSPACE/grpc/third_party/abseil-cpp
8682
mkdir build && cd build
8783
if [[ $OS == ubuntu-latest ]]; then
88-
cmake -DENABLE_GRPC=ON -DWITH_${{matrix.sanitizer}}=On ..
84+
if [[ $SANITIZER == 'ASAN' ]]; then
85+
cmake -DENABLE_GRPC=ON -DWITH_${{matrix.sanitizer}}=On -DGTEST_SKIP_SHARDING=On ..
86+
else
87+
cmake -DENABLE_GRPC=ON -DWITH_${{matrix.sanitizer}}=On ..
88+
fi
8989
elif [[ $OS == macos* ]]; then
9090
cmake -DGH_CI_OSX=ON ..
9191
else
@@ -119,8 +119,6 @@ jobs:
119119
include:
120120
- os: ubuntu-latest
121121
sanitizer: ASAN
122-
cc: gcc-10
123-
cxx: g++-10
124122
test: 'C++'
125123
- os: ubuntu-latest
126124
sanitizer: ASAN

bindings/builtin/builtin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ func (binding *Builtin) Init(u []url.URL, eh bindings.EventsHandler, options ...
255255
caps: C.int64_t(caps.Value),
256256
}
257257

258-
return err2go(C.reindexer_connect_v4(binding.rx, str2c(u[0].Path), opts, str2c(bindings.ReindexerVersion), ccaps))
258+
return err2go(C.reindexer_connect_v4(binding.rx, str2c(u[0].Host+u[0].Path), opts, str2c(bindings.ReindexerVersion), ccaps))
259259
}
260260

261261
func (binding *Builtin) StartWatchOnCtx(ctx context.Context) (CCtxWrapper, error) {

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 = "v4.19.0"
5+
const ReindexerVersion = "v4.20.0"
66

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

changelog.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,32 @@
1+
# Version 4.20.0 (04.02.2025)
2+
## Core
3+
- [fea] Optimized indexed strings memory layout (each unique indexed string now requires 20-36 bytes less memery, depending on platform)
4+
- [fea] Optimized non-built btree-index selection
5+
- [fea] Optimized selections with large documents count in results
6+
- [fea] Reduced allocations count in inserts/upserts and select-queries
7+
- [fea] Changed index compatibility check in `AddIndex`: now `dense` and `regular` indexes are treated compatible
8+
- [fix] Fixed parsing for [EQUAL_POSITION](readme.md#search-in-array-fields-with-matching-array-indexes) with brackets in SQL
9+
10+
## Replication
11+
- [fea] Improved full sync performance for namespaces with large amount of empty documents
12+
13+
## Reindexer server
14+
- [fix] Added more TCP-requests format checks
15+
- [fix] Fixed [server.yml](cpp_src/server/contrib/server.yml) format errors
16+
17+
## Go connector
18+
- [fea] Added support for absolute path on Windows platforms in `builtin`-binding
19+
20+
## Build
21+
- [fix] Fixed build for ARM docker image
22+
23+
## Ported
24+
- [fea/fix] Ported all the fixes and features from [v3.31.0](https://github.com/Restream/reindexer/releases/tag/v3.31.0)
25+
126
# Version 4.19.0 (17.12.2024)
227

328
## Core
4-
- [fea] Added automatic masking for reindexer user's credentials in log files and cluster/sharding JSON's (except for `async_replication` configs in `#config`-namespace)
29+
- [fea] Added automatic masking for reindexer user's credentials in log files and cluster/sharding JSON's (except for `async_replication`-config in `#config`-namespace)
530
- [fix] Fixed assertion on attempt to use 'null'-values with `=`, `IN()`, `<`, `>`, `<=`, `>=` and `RANGE()` operators
631

732
## Replication

cjson/decoder.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ func fieldByTag(t reflect.Type, tag string) (result reflect.StructField, ok bool
3636
}
3737
for i := 0; i < t.NumField(); i++ {
3838
result = t.Field(i)
39-
if ftag := result.Tag.Get("json"); len(ftag) > 0 {
40-
ftag, _ = splitStr(ftag, ',')
39+
if ftag, _ := splitStr(result.Tag.Get("json"), ','); len(ftag) > 0 {
4140
if tag == ftag {
4241
return result, true
4342
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,10 @@ def main():
251251
action='store_true', help='allow alpha checkers from '
252252
'clang-analyzer.')
253253
parser.add_argument('-clang-tidy-binary', metavar='PATH',
254-
default='clang-tidy-18',
254+
default='clang-tidy-19',
255255
help='path to clang-tidy binary')
256256
parser.add_argument('-clang-apply-replacements-binary', metavar='PATH',
257-
default='clang-apply-replacements-18',
257+
default='clang-apply-replacements-19',
258258
help='path to clang-apply-replacements binary')
259259
parser.add_argument('-checks', default=None,
260260
help='checks filter, when not specified, use clang-tidy '

cpp_src/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ else()
5050
option(LINK_RESOURCES "Link web resources as binary data" ON)
5151
endif()
5252

53-
set (REINDEXER_VERSION_DEFAULT "4.19.0")
53+
set (REINDEXER_VERSION_DEFAULT "4.20.0")
5454

5555
if(NOT CMAKE_BUILD_TYPE)
5656
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
@@ -72,6 +72,13 @@ if(MSVC)
7272
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -Zi")
7373
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG -Zi")
7474
set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG -Zi")
75+
elseif(WITH_ASAN)
76+
# Using O2 instead of O3 to build a bit faster.
77+
# Also this allows to avoid SEGFAULT in libasan.so during coroutines interaction on CentOS7 (gcc-12).
78+
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g1")
79+
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g1")
80+
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
81+
set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG")
7582
else()
7683
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g1")
7784
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -g1")

cpp_src/client/itemimplbase.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#pragma once
22

3-
#include <deque>
43
#include <vector>
54
#include "core/keyvalue/variant.h"
65
#include "core/payload/payloadiface.h"
@@ -76,7 +75,7 @@ class ItemImplBase {
7675

7776
std::vector<std::string> precepts_;
7877
bool unsafe_ = false;
79-
std::deque<std::string> holder_;
78+
h_vector<key_string, 16> holder_;
8079
std::vector<std::unique_ptr<char[]>> largeJSONStrings_;
8180
};
8281

cpp_src/client/queryresults.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ class QueryResults {
3737

3838
class Iterator : public CoroQueryResults::Iterator {
3939
public:
40-
Iterator(const QueryResults* r, const CoroQueryResults* qr, int idx, int pos, int nextPos,
41-
ResultSerializer::ItemParams itemParams) noexcept
42-
: CoroQueryResults::Iterator{qr, idx, pos, nextPos, itemParams, {}}, r_(r) {}
40+
Iterator(const QueryResults& r, int idx, int pos, int nextPos, ResultSerializer::ItemParams itemParams) noexcept
41+
: CoroQueryResults::Iterator{&r.results_, idx, pos, nextPos, itemParams, {}}, r_(&r) {}
4342
Iterator& operator*() { return *this; }
4443
Iterator& operator++() noexcept {
4544
try {
@@ -57,11 +56,12 @@ class QueryResults {
5756
}
5857
return *this;
5958
}
59+
6060
const QueryResults* r_;
6161
};
6262

63-
Iterator begin() const noexcept { return Iterator{this, &results_, 0, 0, 0, {}}; }
64-
Iterator end() const noexcept { return Iterator{this, &results_, int(results_.Count()), 0, 0, {}}; }
63+
Iterator begin() const noexcept { return Iterator{*this, 0, 0, 0, {}}; }
64+
Iterator end() const noexcept { return Iterator{*this, int(results_.Count()), 0, 0, {}}; }
6565

6666
size_t Count() const noexcept { return results_.Count(); }
6767
int TotalCount() const noexcept { return results_.TotalCount(); }

0 commit comments

Comments
 (0)