Skip to content

Commit

Permalink
[feature-search-json] Sync with master (2) (#344)
Browse files Browse the repository at this point in the history
* Update to Redis 6.2.2 (#332)

* Fix json.arrappend performance (#324)

* improve arr_pop, arr_insert & arr_trim performance 
* refactor do_json_* functions

* normalize index for backward (#327)

* normalize index for backward
* adpat for full backward with 1.0.x

* fix #318 (#333)

* CircleCI: macOS and benchmark fixes (#337)

* Update config.yml (#338)

* Add JSON.CLEAR command (#306)

* Restore optional path (default is $) for JSON.DEL

* Add JSON.CLEAR

* Handle JSON.CLEAR with $ path

* Add JSON.CLEAR - Fix failure in test:testSetInvalidPathShouldFail

* Idiomatic fixes per Gavrie review

Co-authored-by: Guy Korland <gkorland@gmail.com>

* Update RS_VERSIONS

last promoted builds

* Document flags for running tests

* fix arr_pop backward to 1.0 (#345)

* JSON.INSERTARR backward compatability for 1.0 (#343)

* Fix JSON.INSERTARR backward compatibility with 1.0.x
* Update test.py

* Fix build error
(use of undeclared crate or module `rawmod`)

* Fix format

Co-authored-by: Guy Korland <gkorland@gmail.com>
Co-authored-by: Omer Shadmi <76992134+oshadmi@users.noreply.github.com>
Co-authored-by: tomerhekredis <72793005+tomerhekredis@users.noreply.github.com>
Co-authored-by: Gavrie Philipson <gavrie@philipson.co.il>
Co-authored-by: oshadmi <omer.shadmi@redislabs.com>
  • Loading branch information
6 people committed May 5, 2021
1 parent 795bcad commit 93e471f
Show file tree
Hide file tree
Showing 11 changed files with 431 additions and 185 deletions.
8 changes: 5 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ commands:
name: Setup automation and install dependencies
command: |
./deps/readies/bin/getpy3
python3 -m pip list -v
./system-setup.py
python3 -m pip list -v
source $HOME/.cargo/env
rustc --version
cargo --version
Expand All @@ -100,7 +102,7 @@ commands:
redis-server --version
- restore_cache:
keys:
- v2-dependencies-{{ arch }}-{{ checksum "Cargo.lock" }}
- v3-dependencies-{{ arch }}-{{ checksum "Cargo.lock" }}
- run:
name: Check formatting
command: bash -l -c "make lint"
Expand All @@ -111,7 +113,7 @@ commands:
name: Build release
command: bash -l -c "make build pack <<parameters.build_params>>"
- save_cache:
key: v2-dependencies-{{ arch }}-{{ checksum "Cargo.lock" }}
key: v3-dependencies-{{ arch }}-{{ checksum "Cargo.lock" }}
paths:
- "~/.cargo"
- "./target"
Expand Down Expand Up @@ -213,7 +215,7 @@ jobs:

build-macos:
macos:
xcode: 11.3.0
xcode: 11.6.0
steps:
- build-steps
- test-steps
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ serde_json = "1.0"
serde = "1.0"
libc = "0.2"
jsonpath_lib = { git="https://github.com/RedisJSON/jsonpath.git", branch="public-parser" }
# redis-module = { version="0.15.0", features = ["experimental-api"]}
# redis-module = { version="0.15", features = ["experimental-api"]}
redis-module = { git = "https://github.com/RedisLabsModules/redismodule-rs", features = ["experimental-api"] }
lazy_static = "1.4.0"
# readies-wd40 = { path = "deps/readies/wd40" }
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# BUILD redisfab/rejson:${VERSION}-${ARCH}-${OSNICK}

ARG REDIS_VER=6.2.1
ARG REDIS_VER=6.2.2

# stretch|bionic|buster
ARG OSNICK=buster
Expand Down
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ include $(ROOT)/deps/readies/mk/main
#----------------------------------------------------------------------------------------------

define HELP
make setup # install prerequisites

make build
DEBUG=1 # build debug variant
make clean # remove binary files
Expand Down Expand Up @@ -73,6 +75,14 @@ all: build

#----------------------------------------------------------------------------------------------

setup:
./deps/readies/bin/getpy3
./system-setup.py

.PHONY: setup

#----------------------------------------------------------------------------------------------

lint:
cargo fmt -- --check

Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ Then, build as usual:
cargo build --release
```

When running the tests, you need to explicitly specify the `test` feature to disable use of the Redis memory allocator when testing:

```bash
cargo test --features test
```

If you forget to do this, you'll see an error mentioning `signal: 4, SIGILL: illegal instruction`.

## Run

### Linux
Expand Down
2 changes: 1 addition & 1 deletion deps/readies

0 comments on commit 93e471f

Please sign in to comment.