Skip to content

Commit

Permalink
[doc] Minor doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
reindexer-bot committed Mar 4, 2025
1 parent f814227 commit a842485
Show file tree
Hide file tree
Showing 875 changed files with 118,163 additions and 19,194 deletions.
136 changes: 68 additions & 68 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,35 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
compiler: ["Visual Studio 17 2022"]
compiler: ["Visual Studio 17 2022", "MinGW Makefiles"]
fail-fast: false
env:
EXTRA_FLAGS: "${{ matrix.compiler == 'Visual Studio 17 2022' && '-Ax64' || '' }}"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build Reindexer
run: |
mkdir build && cd build
cmake -G "${{matrix.compiler}}" .. -Ax64
cmake -G "${{matrix.compiler}}" -DBUILD_ANN_INDEXES=builtin .. $EXTRA_FLAGS
cmake --build . --config Release
cmake --build . --config Release --target face
cmake --build . --config Release --target swagger
cpack
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: windows-latest
path: build/*.exe
if-no-files-found: error
build-windows-2019:
runs-on: windows-2019
strategy:
matrix:
compiler: ["Visual Studio 16 2019", "MinGW Makefiles"]
compiler: ["Visual Studio 16 2019"]
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build Reindexer
run: |
mkdir build && cd build
cmake -G "${{matrix.compiler}}" ..
cmake -G "${{matrix.compiler}}" -DBUILD_ANN_INDEXES=none ..
cmake --build . --config Release
cmake --build . --config Release --target face
cmake --build . --config Release --target swagger
Expand Down Expand Up @@ -183,68 +179,72 @@ jobs:
if [[ -z "$SANITIZER" ]]; then
go test -timeout 15m ./test/... -bench . -benchmem -benchtime 100ms -seedcount 50000
else
go test -timeout 35m ./test/... -bench . -benchmem -benchtime 100ms -seedcount 50000
export TSAN_OPTIONS="halt_on_error=1"
export RX_IVF_OMP_THREADS=1
export REINDEXER_GH_CI_TSAN=1
go test -timeout 35m ./test/... -bench . -benchmem -benchtime 100ms -seedcount 50000 -tags tiny_vectors
fi
else
cd build
ctest --verbose
fi
test-pyreindexer:
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04]
fail-fast: false
runs-on: ${{matrix.os}}
needs: build
if: always()
env:
OS: ${{matrix.os}}
steps:
- name: Download ${{matrix.os}} Artifacts
uses: actions/download-artifact@v4
with:
name: ${{matrix.os}}
- name: 'Untar Artifacts'
run: tar -xvf artifacts.tar
- name: Prepare Environment
run: |
if [[ $OS == ubuntu* ]]; then
sudo ./dependencies.sh
python3 -m pip install setuptools build
else
./dependencies.sh
fi
- name: Install Reindexer
run: |
cd build
if [[ $OS == ubuntu* ]]; then
sudo dpkg -i reindexer-4-dev*.deb
sudo apt-get install -f
sudo dpkg -i reindexer-4-server*.deb
sudo apt-get install -f
else
for f in reindexer-*.tar.gz; do tar -xvzf "$f"; done
cp -R ./usr/local/include/reindexer /usr/local/include/reindexer
cp -R ./usr/local/lib/reindexer /usr/local/lib/reindexer
cp ./usr/local/lib/libreindexer.a /usr/local/lib/libreindexer.a
cp ./usr/local/lib/libreindexer_server_library.a /usr/local/lib/libreindexer_server_library.a
cp ./usr/local/lib/libreindexer_server_resources.a /usr/local/lib/libreindexer_server_resources.a
cp ./usr/local/lib/pkgconfig/libreindexer.pc /usr/local/lib/pkgconfig/libreindexer.pc
cp ./usr/local/lib/pkgconfig/libreindexer_server.pc /usr/local/lib/pkgconfig/libreindexer_server.pc
cp ./usr/local/bin/reindexer_server /usr/local/bin/reindexer_server
cp ./usr/local/etc/reindexer.conf.pkg /usr/local/etc/reindexer.conf.pkg
fi
- name: Clone PyReindexer
uses: actions/checkout@v4
with:
repository: restream/reindexer-py
- name: Install PyReindexer
run: |
python -m build
python -m pip install .
- name: Test PyReindexer
run: |
cd pyreindexer
../.github/workflows/test.sh
# TODO: Reenable after binding's compatibility fix
# test-pyreindexer:
# strategy:
# matrix:
# os: [ubuntu-22.04, ubuntu-24.04]
# fail-fast: false
# runs-on: ${{matrix.os}}
# needs: build
# if: always()
# env:
# OS: ${{matrix.os}}
# steps:
# - name: Download ${{matrix.os}} Artifacts
# uses: actions/download-artifact@v4
# with:
# name: ${{matrix.os}}
# - name: 'Untar Artifacts'
# run: tar -xvf artifacts.tar
# - name: Prepare Environment
# run: |
# if [[ $OS == ubuntu* ]]; then
# sudo ./dependencies.sh
# python3 -m pip install setuptools build
# else
# ./dependencies.sh
# fi
# - name: Install Reindexer
# run: |
# cd build
# if [[ $OS == ubuntu* ]]; then
# sudo dpkg -i reindexer-4-dev*.deb
# sudo apt-get install -f
# sudo dpkg -i reindexer-4-server*.deb
# sudo apt-get install -f
# else
# for f in reindexer-*.tar.gz; do tar -xvzf "$f"; done
# cp -R ./usr/local/include/reindexer /usr/local/include/reindexer
# cp -R ./usr/local/lib/reindexer /usr/local/lib/reindexer
# cp ./usr/local/lib/libreindexer.a /usr/local/lib/libreindexer.a
# cp ./usr/local/lib/libreindexer_server_library.a /usr/local/lib/libreindexer_server_library.a
# cp ./usr/local/lib/libreindexer_server_resources.a /usr/local/lib/libreindexer_server_resources.a
# cp ./usr/local/lib/pkgconfig/libreindexer.pc /usr/local/lib/pkgconfig/libreindexer.pc
# cp ./usr/local/lib/pkgconfig/libreindexer_server.pc /usr/local/lib/pkgconfig/libreindexer_server.pc
# cp ./usr/local/bin/reindexer_server /usr/local/bin/reindexer_server
# cp ./usr/local/etc/reindexer.conf.pkg /usr/local/etc/reindexer.conf.pkg
# fi
# - name: Clone PyReindexer
# uses: actions/checkout@v4
# with:
# repository: restream/reindexer-py
# - name: Install PyReindexer
# run: |
# python -m build
# python -m pip install .
# - name: Test PyReindexer
# run: |
# cd pyreindexer
# ../.github/workflows/test.sh

3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
cmake_minimum_required(VERSION 3.10..3.13)
cmake_minimum_required(VERSION 3.18)

project(reindexer)

enable_testing()
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_PCH_WARN_INVALID OFF)
set(REINDEXER_SOURCE_PATH ${PROJECT_SOURCE_DIR}/cpp_src)

add_subdirectory(cpp_src)
43 changes: 0 additions & 43 deletions appveyor.yml

This file was deleted.

10 changes: 7 additions & 3 deletions bindings.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"github.com/prometheus/client_golang/prometheus"
otelattr "go.opentelemetry.io/otel/attribute"

"github.com/restream/reindexer/v4/bindings"
"github.com/restream/reindexer/v4/bindings/builtinserver/config"
"github.com/restream/reindexer/v4/cjson"
"github.com/restream/reindexer/v5/bindings"
"github.com/restream/reindexer/v5/bindings/builtinserver/config"
"github.com/restream/reindexer/v5/cjson"
)

const (
Expand All @@ -32,6 +32,10 @@ func (db *reindexerImpl) modifyItem(ctx context.Context, namespace string, ns *r
}
}

if item == nil {
return 0, fmt.Errorf("rq: nil value in item modify call for '%s' namespace", namespace)
}

for tryCount := 0; tryCount < 2; tryCount++ {
ser := cjson.NewPoolSerializer()
defer ser.Close()
Expand Down
9 changes: 5 additions & 4 deletions bindings/builtin/builtin.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"time"
"unsafe"

"github.com/restream/reindexer/v4/bindings"
"github.com/restream/reindexer/v4/cjson"
"github.com/restream/reindexer/v5/bindings"
"github.com/restream/reindexer/v5/cjson"
)

const defCgoLimit = 2000
Expand Down Expand Up @@ -250,12 +250,13 @@ func (binding *Builtin) Init(u []url.URL, eh bindings.EventsHandler, options ...
caps := *bindings.DefaultBindingCapabilities().
WithResultsWithShardIDs(true).
WithQrIdleTimeouts(true).
WithIncarnationTags(true)
WithIncarnationTags(true).
WithFloatRank(true)
ccaps := C.BindingCapabilities{
caps: C.int64_t(caps.Value),
}

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

func (binding *Builtin) StartWatchOnCtx(ctx context.Context) (CCtxWrapper, error) {
Expand Down
2 changes: 1 addition & 1 deletion bindings/builtin/builtin_posix.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package builtin

// #cgo pkg-config: libreindexer
// #cgo CXXFLAGS: -std=c++17 -g -O2 -Wall -Wpedantic -Wextra
// #cgo CXXFLAGS: -std=c++20 -g -O2 -Wall -Wpedantic -Wextra
// #cgo CFLAGS: -std=c99 -g -O2 -Wall -Wpedantic -Wno-unused-variable
// #cgo LDFLAGS: -g
import "C"
4 changes: 2 additions & 2 deletions bindings/builtin/builtin_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

package builtin

// #cgo CXXFLAGS: -std=c++17 -g -O2 -Wall -Wpedantic -Wextra -I../../cpp_src
// #cgo CXXFLAGS: -std=c++20 -g -O2 -Wall -Wpedantic -Wextra -I../../cpp_src
// #cgo CFLAGS: -std=c99 -g -O2 -Wall -Wpedantic -Wno-unused-variable -I../../cpp_src
// #cgo LDFLAGS: -L${SRCDIR}/../../build/cpp_src/ -lreindexer -lleveldb -lsnappy -g -lshlwapi -ldbghelp -lws2_32
// #cgo LDFLAGS: -L${SRCDIR}/../../build/cpp_src/ -lreindexer -lleveldb -lsnappy -g -lgomp -lshlwapi -ldbghelp -lws2_32
import "C"
2 changes: 1 addition & 1 deletion bindings/builtin/cgoeventshandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"time"
"unsafe"

"github.com/restream/reindexer/v4/bindings"
"github.com/restream/reindexer/v5/bindings"
)

type CGOEventsHandler struct {
Expand Down
2 changes: 1 addition & 1 deletion bindings/builtin/posix_config.go.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

package builtin

// #cgo CXXFLAGS: -std=c++17 -g -O2 -Wall -Wpedantic -Wextra @cgo_cxx_flags@
// #cgo CXXFLAGS: -std=c++20 -g -O2 -Wall -Wpedantic -Wextra @cgo_cxx_flags@
// #cgo CFLAGS: -std=c99 -g -O2 -Wall -Wpedantic -Wno-unused-variable @cgo_c_flags@
// #cgo LDFLAGS: @cgo_ld_flags@ -g
import "C"
6 changes: 3 additions & 3 deletions bindings/builtinserver/builtinserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"time"
"unsafe"

"github.com/restream/reindexer/v4/bindings"
"github.com/restream/reindexer/v4/bindings/builtin"
"github.com/restream/reindexer/v4/bindings/builtinserver/config"
"github.com/restream/reindexer/v5/bindings"
"github.com/restream/reindexer/v5/bindings/builtin"
"github.com/restream/reindexer/v5/bindings/builtinserver/config"
)

var defaultStartupTimeout time.Duration = time.Minute * 3
Expand Down
2 changes: 1 addition & 1 deletion bindings/builtinserver/builtinserver_posix.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package builtinserver

// #cgo pkg-config: libreindexer_server
// #cgo CXXFLAGS: -std=c++17 -g -O2 -Wall -Wpedantic -Wextra
// #cgo CXXFLAGS: -std=c++20 -g -O2 -Wall -Wpedantic -Wextra
// #cgo CFLAGS: -std=c99 -g -O2 -Wall -Wpedantic -Wno-unused-variable
// #cgo LDFLAGS: -g
import "C"
4 changes: 2 additions & 2 deletions bindings/builtinserver/builtinserver_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

package builtinserver

// #cgo CXXFLAGS: -std=c++17 -g -O2 -Wall -Wpedantic -Wextra -I../../cpp_src
// #cgo CXXFLAGS: -std=c++20 -g -O2 -Wall -Wpedantic -Wextra -I../../cpp_src
// #cgo CFLAGS: -std=c99 -g -O2 -Wall -Wpedantic -Wno-unused-variable -I../../cpp_src
// #cgo LDFLAGS: -L${SRCDIR}/../../build/cpp_src/ -L${SRCDIR}/../../build/cpp_src/server/ -lreindexer_server_library -lreindexer -lreindexer_server_resources -lleveldb -lsnappy -g -lstdc++ -lshlwapi -ldbghelp -lws2_32
// #cgo LDFLAGS: -L${SRCDIR}/../../build/cpp_src/ -L${SRCDIR}/../../build/cpp_src/server/ -lreindexer_server_library -lreindexer -lreindexer_server_resources -lleveldb -lsnappy -g -lgomp -lstdc++ -lshlwapi -ldbghelp -lws2_32
import "C"
2 changes: 1 addition & 1 deletion bindings/builtinserver/posix_config.go.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

package builtinserver

// #cgo CXXFLAGS: -std=c++17 -g -O2 -Wall -Wpedantic -Wextra @cgo_cxx_flags@
// #cgo CXXFLAGS: -std=c++20 -g -O2 -Wall -Wpedantic -Wextra @cgo_cxx_flags@
// #cgo CFLAGS: -std=c99 -g -O2 -Wall -Wpedantic -Wno-unused-variable @cgo_c_flags@
// #cgo LDFLAGS: @cgo_ld_flags@ -g
import "C"
Loading

0 comments on commit a842485

Please sign in to comment.