Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor grpc/status.withDetails function for performance #2664

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .gitfiles
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,7 @@ go.mod
go.sum
hack/CHANGELOG.template.md
hack/actions/gen/main.go
hack/actions/gen/main_test.go
hack/benchmark/assets/checksum/fashion-mnist-784-euclidean.md5
hack/benchmark/assets/checksum/gist-960-euclidean.md5
hack/benchmark/assets/checksum/glove-100-angular.md5
Expand Down Expand Up @@ -717,6 +718,8 @@ hack/helm/schema/gen/main.go
hack/helm/schema/gen/main_test.go
hack/license/gen/main.go
hack/license/gen/main_test.go
hack/tools/deadlink/index.html
hack/tools/deadlink/main.go
hack/tools/kvsdb/main.go
hack/tools/metrics/main.go
hack/tools/metrics/main_test.go
Expand Down Expand Up @@ -887,6 +890,7 @@ internal/core/algorithm/ngt/ngt_test.go
internal/core/algorithm/ngt/option.go
internal/core/algorithm/ngt/option_test.go
internal/core/algorithm/usearch/option.go
internal/core/algorithm/usearch/option_test.go
internal/core/algorithm/usearch/usearch.go
kpango marked this conversation as resolved.
Show resolved Hide resolved
internal/core/algorithm/usearch/usearch_test.go
internal/db/kvs/bbolt/bbolt.go
Expand Down Expand Up @@ -1032,6 +1036,7 @@ internal/errors/tls.go
internal/errors/unit.go
internal/errors/unit_test.go
internal/errors/usearch.go
internal/errors/usearch_test.go
internal/errors/vald.go
internal/errors/vald_test.go
internal/errors/vqueue.go
Expand Down Expand Up @@ -1161,6 +1166,7 @@ internal/net/grpc/client_test.go
internal/net/grpc/codec.go
internal/net/grpc/codec_test.go
internal/net/grpc/codes/codes.go
internal/net/grpc/codes/codes_test.go
internal/net/grpc/context.go
internal/net/grpc/context_test.go
internal/net/grpc/credentials/credentials.go
Expand Down Expand Up @@ -1288,6 +1294,8 @@ internal/observability/trace/status_test.go
internal/observability/trace/trace.go
internal/observability/trace/trace_option.go
internal/observability/trace/trace_test.go
internal/os/hostname.go
kpango marked this conversation as resolved.
Show resolved Hide resolved
internal/os/hostname_test.go
kpango marked this conversation as resolved.
Show resolved Hide resolved
internal/params/option.go
internal/params/option_test.go
internal/params/params.go
Expand Down Expand Up @@ -1702,7 +1710,6 @@ pkg/gateway/filter/router/router.go
pkg/gateway/filter/router/router_test.go
pkg/gateway/filter/usecase/vald.go
pkg/gateway/filter/usecase/vald_test.go
pkg/gateway/internal/location/location_test.go
pkg/gateway/lb/README.md
pkg/gateway/lb/config/config.go
pkg/gateway/lb/config/config_test.go
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ assignees: ""
<!--- Please change the versions below along with your environment -->

- Vald Version: v1.7.13
- Go Version: v1.23.1
- Go Version: v1.23.2
- Rust Version: v1.81.0
- Docker Version: v27.3.1
- Kubernetes Version: v1.31.1
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/security_issue_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ assignees: ""
<!--- Please change the versions below along with your environment -->

- Vald Version: v1.7.13
- Go Version: v1.23.1
- Go Version: v1.23.2
- Rust Version: v1.81.0
- Docker Version: v27.3.1
- Kubernetes Version: v1.31.1
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<!--- Please change the versions below along with your environment -->
- Vald Version: v1.7.13
- Go Version: v1.23.1
- Go Version: v1.23.2
- Rust Version: v1.81.0
- Docker Version: v27.3.1
- Kubernetes Version: v1.31.1
Expand Down
27 changes: 16 additions & 11 deletions Makefile.d/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,15 @@ $(LIB_PATH)/libz.a: $(LIB_PATH)
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_STATIC_EXECS=ON \
-DBUILD_TESTING=OFF \
-DCMAKE_C_FLAGS="-fPIC" \
-DCMAKE_INSTALL_PREFIX=$(USR_LOCAL) \
-DZLIB_BUILD_SHARED=OFF \
-DZLIB_BUILD_STATIC=ON \
-DZLIB_USE_STATIC_LIBS=ON \
-DZLIB_COMPAT=ON \
.. \
-DZLIB_USE_STATIC_LIBS=ON \
-DCMAKE_CXX_FLAGS="$(CXXFLAGS)" \
-DCMAKE_C_FLAGS="$(CFLAGS)" \
-DCMAKE_INSTALL_LIBDIR=$(LIB_PATH) \
-DCMAKE_INSTALL_PREFIX=$(USR_LOCAL) \
-B $(TEMP_DIR)/zlib/build $(TEMP_DIR)/zlib \
&& make -j$(CORES) \
&& make install \
&& cd $(ROOTDIR) \
Expand All @@ -234,24 +236,27 @@ hdf5/install: $(LIB_PATH)/libhdf5.a
$(LIB_PATH)/libhdf5.a: $(LIB_PATH) \
zlib/install
mkdir -p $(TEMP_DIR)/hdf5 \
&& curl -fsSL https://github.com/HDFGroup/hdf5/releases/download/$(HDF5_VERSION)/hdf5.tar.gz -o $(TEMP_DIR)/hdf5.tar.gz \
&& tar -xzvf $(TEMP_DIR)/hdf5.tar.gz -C $(TEMP_DIR)/hdf5 --strip-components 2 \
&& curl -fsSL https://github.com/HDFGroup/hdf5/archive/refs/tags/$(HDF5_VERSION).tar.gz -o $(TEMP_DIR)/hdf5.tar.gz \
&& tar -xzvf $(TEMP_DIR)/hdf5.tar.gz -C $(TEMP_DIR)/hdf5 --strip-components 1 \
&& mkdir -p $(TEMP_DIR)/hdf5/build \
&& cd $(TEMP_DIR)/hdf5/build \
&& cmake -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_STATIC_EXECS=ON \
-DBUILD_TESTING=OFF \
-DCMAKE_INSTALL_PREFIX=$(USR_LOCAL) \
-DH5_ZLIB_INCLUDE_DIR=$(USR_LOCAL)/include \
-DH5_ZLIB_LIBRARY=$(LIB_PATH)/libz.a \
-DHDF5_BUILD_CPP_LIB=OFF \
-DHDF5_BUILD_HL_LIB=ON \
-DHDF5_BUILD_STATIC_EXECS=ON \
-DHDF5_BUILD_TOOLS=OFF \
-DHDF5_ENABLE_Z_LIB_SUPPORT=ON \
.. \
-DH5_ZLIB_INCLUDE_DIR=$(USR_LOCAL)/include \
-DH5_ZLIB_LIBRARY=$(LIB_PATH)/libz.a \
-DCMAKE_CXX_FLAGS="$(CXXFLAGS)" \
-DCMAKE_C_FLAGS="$(CFLAGS)" \
-DCMAKE_INSTALL_LIBDIR=$(LIB_PATH) \
-DCMAKE_INSTALL_PREFIX=$(USR_LOCAL) \
-B $(TEMP_DIR)/hdf5/build $(TEMP_DIR)/hdf5 \
&& make -j$(CORES) \
&& make install \
&& cd $(ROOTDIR) \
&& rm -rf $(TEMP_DIR)/hdf5.tar.gz $(TEMP_DIR)/HDF5_VERSION
&& rm -rf $(TEMP_DIR)/hdf5.tar.gz $(TEMP_DIR)/hdf5
2 changes: 1 addition & 1 deletion dockers/ci/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ ENV REPO=vald
ENV RUST_HOME=/usr/local/lib/rust
ENV TZ=Etc/UTC
ENV USER=root
ENV CARGO_HOME=${RUST_HOME}/cargo
ENV RUSTUP_HOME=${RUST_HOME}/rustup
ENV CARGO_HOME=${RUST_HOME}/cargo
ENV PATH=${CARGO_HOME}/bin:${GOPATH}/bin:${GOROOT}/bin:${RUSTUP_HOME}/bin:/usr/local/bin:${PATH}
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
Expand Down
12 changes: 6 additions & 6 deletions example/client/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/vdaas/vald/example/client

go 1.23.1
go 1.23.2

replace (
github.com/envoyproxy/protoc-gen-validate => github.com/envoyproxy/protoc-gen-validate v1.1.0
Expand All @@ -11,10 +11,10 @@ replace (
golang.org/x/crypto => golang.org/x/crypto v0.27.0
golang.org/x/net => golang.org/x/net v0.29.0
golang.org/x/text => golang.org/x/text v0.18.0
google.golang.org/genproto => google.golang.org/genproto v0.0.0-20240924160255-9d4c2d233b61
google.golang.org/genproto/googleapis/api => google.golang.org/genproto/googleapis/api v0.0.0-20240924160255-9d4c2d233b61
google.golang.org/genproto/googleapis/rpc => google.golang.org/genproto/googleapis/rpc v0.0.0-20240924160255-9d4c2d233b61
google.golang.org/grpc => google.golang.org/grpc v1.67.0
google.golang.org/genproto => google.golang.org/genproto v0.0.0-20240930140551-af27646dc61f
google.golang.org/genproto/googleapis/api => google.golang.org/genproto/googleapis/api v0.0.0-20240930140551-af27646dc61f
google.golang.org/genproto/googleapis/rpc => google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f
google.golang.org/grpc => google.golang.org/grpc v1.67.1
google.golang.org/protobuf => google.golang.org/protobuf v1.34.2
gopkg.in/yaml.v2 => gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 => gopkg.in/yaml.v3 v3.0.1
Expand All @@ -37,6 +37,6 @@ require (
golang.org/x/sys v0.25.0 // indirect
golang.org/x/text v0.18.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240924160255-9d4c2d233b61 // indirect
kpango marked this conversation as resolved.
Show resolved Hide resolved
google.golang.org/protobuf v1.34.2 // indirect
)
2 changes: 1 addition & 1 deletion example/client/go.mod.default
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/vdaas/vald/example/client

go 1.23.1
go 1.23.2

replace (
github.com/envoyproxy/protoc-gen-validate => github.com/envoyproxy/protoc-gen-validate latest
Expand Down
12 changes: 6 additions & 6 deletions example/client/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946 h1:vJpL69PeUullhJyKtTjHjENEmZU3BkO4e+fod7nKzgM=
gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946/go.mod h1:BQUWDHIAygjdt1HnUPQ0eWqLN2n5FwJycrpYUVUOx2I=
google.golang.org/genproto/googleapis/api v0.0.0-20240924160255-9d4c2d233b61 h1:pAjq8XSSzXoP9ya73v/w+9QEAAJNluLrpmMq5qFJQNY=
google.golang.org/genproto/googleapis/api v0.0.0-20240924160255-9d4c2d233b61/go.mod h1:O6rP0uBq4k0mdi/b4ZEMAZjkhYWhS815kCvaMha4VN8=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240924160255-9d4c2d233b61 h1:N9BgCIAUvn/M+p4NJccWPWb3BWh88+zyL0ll9HgbEeM=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240924160255-9d4c2d233b61/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw=
google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA=
google.golang.org/genproto/googleapis/api v0.0.0-20240930140551-af27646dc61f h1:jTm13A2itBi3La6yTGqn8bVSrc3ZZ1r8ENHlIXBfnRA=
google.golang.org/genproto/googleapis/api v0.0.0-20240930140551-af27646dc61f/go.mod h1:CLGoBuH1VHxAUXVPP8FfPwPEVJB6lz3URE5mY2SuayE=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f h1:cUMEy+8oS78BWIH9OWazBkzbr090Od9tWBNtZHkOhf0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E=
google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
Loading
Loading