Skip to content

Commit

Permalink
Update to version v3.23.1
Browse files Browse the repository at this point in the history
  • Loading branch information
MadSchemas committed Mar 20, 2024
1 parent 47b03e6 commit b569e46
Show file tree
Hide file tree
Showing 50 changed files with 1,714 additions and 523 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ jobs:
cxx: g++-10
- os: ubuntu-latest
sanitizer: TSAN
cc: gcc-10
cxx: g++-10
cc: gcc-12
cxx: g++-12
fail-fast: false
runs-on: ${{matrix.os}}
env:
Expand Down Expand Up @@ -124,8 +124,8 @@ jobs:
test: 'GO'
# - os: ubuntu-latest
# sanitizer: TSAN
# cc: gcc-10
# cxx: g++-10
# cc: gcc-12
# cxx: g++-12
# test: 'C++'
- os: ubuntu-latest
sanitizer: TSAN
Expand All @@ -139,6 +139,12 @@ jobs:
CXX: ${{matrix.cxx}}
TEST: ${{matrix.test}}
steps:
- name: Fix kernel mmap rnd bits
if: ${{ matrix.os != 'macos-latest' && matrix.sanitizer != '' }}
# Asan provided in ubuntu 22.04 is incompatible with
# high-entropy ASLR in much newer kernels that GitHub runners are
# using leading to random crashes: https://reviews.llvm.org/D148280
run: sudo sysctl vm.mmap_rnd_bits=28
- name: Checkout repository
if: ${{ matrix.os != 'macos-latest' || matrix.test == 'GO' }}
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion bindings/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package bindings

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

const ReindexerVersion = "v3.23.0"
const ReindexerVersion = "v3.23.1"

// public go consts from type_consts.h and reindexer_ctypes.h
const (
Expand Down
16 changes: 16 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# Version 3.23.1 (20.03.2024)

## Core
- [fix] Fixed crash in the incremental fulltext index during typos handling
- [fix] Fixed crash in the UPDATE-query in the case when this query sets values for some array-field and composite index simultaneously

## Go connector
- [fix] Fixed `joined` and `composite` fields behavior: from now fields with those tags will not be created in the database

## Build
- [fix] Fixed `Release` build with GCC-12
- [fix] Added version check for `Google Benchmark` library during the build

## Deploy
- [fea] Added `clang-tidy` configs into `GitHub` source tree

# Version 3.23.0 (07.03.2024)

## Core
Expand Down
2 changes: 1 addition & 1 deletion cjson/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func fieldByTag(t reflect.Type, tag string) (result reflect.StructField, ok bool
for i := 0; i < t.NumField(); i++ {
result = t.Field(i)
if ftag := result.Tag.Get("json"); len(ftag) > 0 {
ftag, _, _ = splitStr(ftag, ',')
ftag, _ = splitStr(ftag, ',')
if tag == ftag {
return result, true
}
Expand Down
34 changes: 16 additions & 18 deletions cjson/encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,33 +96,31 @@ func mkFieldInfo(v reflect.Value, ctagName int, sf reflect.StructField) fieldInf
}

// non allocating version of strings.Split
func splitStr(in string, sep byte) (s1, s2, s3 string) {

out := []*string{&s1, &s2, &s3}

for i := 0; i < len(out); i++ {
pos := strings.IndexByte(in, sep)

if pos != -1 {
*out[i] = in[:pos]
in = in[pos+1:]
} else {
*out[i] = in
break
}
func splitStr(in string, sep byte) (s1, s2 string) {
if pos := strings.IndexByte(in, sep); pos != -1 {
s1 = in[:pos]
s2 = in[pos+1:]
} else {
s1 = in
}
return
}

func parseStructField(sf reflect.StructField) (name string, skip, omitEmpty bool) {
name, opt, _ := splitStr(sf.Tag.Get("json"), ',')
name, opts := splitStr(sf.Tag.Get("json"), ',')
if name == "-" || len(sf.PkgPath) != 0 {
skip = true
} else if name == "" {
name = sf.Name
}

omitEmpty = (opt == "omitempty")
omitEmpty = strings.Contains(opts, "omitempty")

if !skip {
_, opts = splitStr(sf.Tag.Get("reindex"), ',')
skip = strings.Contains(opts, "joined") || strings.Contains(opts, "composite")
}

return
}

Expand Down Expand Up @@ -589,9 +587,9 @@ func ParseUuid(str string) (res [2]uint64, err error) {
err = fmt.Errorf("UUID should consist of 32 hexadecimal digits: '%s'", str)
return
}
if (res[0] != 0 || res[1] != 0) && (res[1] >> 63) == 0 {
if (res[0] != 0 || res[1] != 0) && (res[1]>>63) == 0 {
err = fmt.Errorf("Variant 0 of UUID is unsupported: '%s'", str)
}
}
return
}

Expand Down
2 changes: 1 addition & 1 deletion cjson/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (enc *Validator) validateLevel(src reflect.Type, fieldName string, parsed *

for i := 0; i < src.NumField(); i++ {
field := src.Field(i)
tag, _, _ := splitStr(field.Tag.Get("json"), ',')
tag, _ := splitStr(field.Tag.Get("json"), ',')

if len(tag) == 0 && field.Name != "_" {
tag = field.Name
Expand Down
30 changes: 30 additions & 0 deletions clang-tidy/.clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Checks: 'clang-diagnostic-*,
clang-analyzer-*,
performance-*,
bugprone-*,
-bugprone-exception-escape,
-bugprone-branch-clone,
-bugprone-easily-swappable-parameters,
-bugprone-macro-parentheses,
-bugprone-signed-char-misuse,
-bugprone-narrowing-conversions,
-bugprone-reserved-identifier,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-assignment-in-if-condition,
-bugprone-parent-virtual-call,
-bugprone-integer-division,
-bugprone-unhandled-self-assignment
-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,
-performance-no-int-to-ptr,
-performance-avoid-endl'
# clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling - too many unnecessary warning in vendored code
# performance-no-int-to-ptr - consider how to fix this
# bugprone-macro-parentheses - consider fixing
WarningsAsErrors: '*'
HeaderFilterRegex: '.*(?<!\.pb\.h)$'
AnalyzeTemporaryDtors: false
FormatStyle: none
CheckOptions:
- { key: performance-unnecessary-value-param.AllowedTypes, value: 'span;IdType;ReplicationStatsCollector;KeyValueType' }
- { key: performance-move-const-arg.CheckTriviallyCopyableMove, value: 0 }

10 changes: 10 additions & 0 deletions clang-tidy/.clang-tidy-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# ASM files
*/asm/*.S
*yaml.cc
# Generated stemmer files
*/libstemmer/*/stem_UTF_8_*.c
*/libstemmer/*/stem_UTF_8_*.h
# Murmurhash
*/murmurhash/MurmurHash3.cc
# Backtrace library
*/libbacktrace/*
Loading

0 comments on commit b569e46

Please sign in to comment.