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

[pull] unstable from apache:unstable #84

Merged
merged 32 commits into from
Feb 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
aa1de3f
Fix BITCOUNT/BITPOS negative handling (#2069)
mapleFU Jan 29, 2024
9d618e0
Initialize metadata and tag indexing encoding for RediSearch (#2066)
PragmaTwice Jan 30, 2024
fd33e55
Ignore max-db-size limit when deleting data or writing aux informatio…
caipengbo Jan 30, 2024
6eb8018
Allow to migrate cluster slot by raw write batch (#2067)
caipengbo Jan 31, 2024
e95e6f7
Making RedisBitmapTest also tests Bitmap String (#2075)
mapleFU Jan 31, 2024
c2fe475
Bump jsoncons to 0.173.2 (#2082)
aleksraiden Feb 1, 2024
972adb7
Bump speedb to 2.8.0 (#2080)
aleksraiden Feb 1, 2024
eb6dba5
Bump fmtlib to 10.2.1 (#2081)
aleksraiden Feb 1, 2024
40e996c
Use human readable string instead of the integer when printing flush/…
git-hulk Feb 1, 2024
70fac37
Add search metadata encoding for numeric fields (#2086)
PragmaTwice Feb 1, 2024
4d85538
Make BITPOS in Bitmap handling `stop_given` (#2085)
mapleFU Feb 2, 2024
4a1a1be
Add support of RESP3 attribute type (#2088)
git-hulk Feb 5, 2024
bb07671
Bump jsoncons to 0.173.4 (#2089)
aleksraiden Feb 6, 2024
afb1382
chore: add x on Social Media (#2090)
caicancai Feb 6, 2024
5940b73
Support BIT and BYTE options in the BITCOUNT command (#2087)
kay011 Feb 7, 2024
a8d132f
Bump span-lite to 0.11.0 (#2092)
aleksraiden Feb 8, 2024
62704d9
Bump typo checker in CI to 1.18.1 (#2093)
aleksraiden Feb 9, 2024
4fb22be
Add a noindex flag to search metadata (#2094)
PragmaTwice Feb 10, 2024
58d177f
Unify the workflow of command executing in connection and scripting (…
PragmaTwice Feb 10, 2024
af18420
Improve code style for auth in ExecuteCommands (#2096)
PragmaTwice Feb 10, 2024
eee6486
Add usage of std::move where compiler suggested (#2099)
torwig Feb 13, 2024
cf2f4ad
test: Use require.JSONEq instead of require.Equal for the JSON string…
jihuayu Feb 13, 2024
444976a
ci: Update actions to avoid Node.js deprecated warning (#2098)
aleksraiden Feb 15, 2024
1052bab
Set the redis-cursor-compatible field to yes in the initial configura…
jihuayu Feb 17, 2024
e8c05a3
Fix flaky test cases in keyspace_test.go (#2104)
git-hulk Feb 17, 2024
7fe2bc2
Add support of RESP3 verbatim string (#2102)
wsehjk Feb 18, 2024
fb7acf6
Bitmap: Extract common bit operations like GetBit and SetBitTo (#2105)
mapleFU Feb 19, 2024
30f6bee
Small corrections of spelling in a config file (#2107)
aleksraiden Feb 21, 2024
199a770
Bump rocksdb to 8.10.2 (#2110)
aleksraiden Feb 21, 2024
5fb6079
Minor refactor BitOp (#2108)
mapleFU Feb 21, 2024
8a19bd5
Check if the type is an entry while iterating the stream subkeys (#2…
jihuayu Feb 23, 2024
7571034
Initialize the unified index updater for HASH and JSON data type (#2111)
PragmaTwice Feb 24, 2024
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
41 changes: 22 additions & 19 deletions .github/workflows/kvrocks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ jobs:
outputs:
docs_only: ${{ steps.result.outputs.docs_only }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3.0.0
id: changes
with:
filters: .github/config/changes.yml
Expand All @@ -56,9 +56,9 @@ jobs:
env:
FORCE_COLOR: 1
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install typos
run: curl -LsSf https://github.com/crate-ci/typos/releases/download/v1.16.3/typos-v1.16.3-x86_64-unknown-linux-musl.tar.gz | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin
run: curl -LsSf https://github.com/crate-ci/typos/releases/download/v1.18.2/typos-v1.18.2-x86_64-unknown-linux-musl.tar.gz | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin
- name: Run typos check
run: typos --config .github/config/typos.toml

Expand All @@ -68,15 +68,16 @@ jobs:
if: ${{ needs.precondition.outputs.docs_only != 'true' }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'tests/gocase/go.mod'
cache: false
- name: Prepare Dependencies
run: |
sudo apt update
sudo apt install -y clang-format-14 clang-tidy-14
- uses: apache/skywalking-eyes/header@v0.4.0
- uses: apache/skywalking-eyes/header@v0.5.0
with:
config: .github/config/licenserc.yml
- name: Check with clang-format
Expand All @@ -96,7 +97,7 @@ jobs:
git diff -p > clang-format.patch
cat clang-format.patch
- name: Upload format patch
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always() && steps.check-format.outcome != 'success'
with:
path: clang-format.patch
Expand Down Expand Up @@ -214,7 +215,7 @@ jobs:

- name: Cache redis
id: cache-redis
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/local/bin/redis-cli
Expand All @@ -227,16 +228,17 @@ jobs:
mkdir -p $HOME/local/bin
pushd redis-6.2.7 && BUILD_TLS=yes make -j$NPROC redis-cli && mv src/redis-cli $HOME/local/bin/ && popd

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version-file: 'tests/gocase/go.mod'

cache: false

- name: Install gcovr 5.0
run: pip install gcovr==5.0 # 5.1 is not supported
if: ${{ matrix.sonarcloud }}
Expand Down Expand Up @@ -308,7 +310,7 @@ jobs:
exit 1
fi

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: ${{ failure() && startsWith(matrix.os, 'ubuntu') }}
with:
name: kvrocks-coredumps-${{ matrix.name }}
Expand All @@ -330,7 +332,7 @@ jobs:

- name: Upload SonarCloud data
if: ${{ matrix.sonarcloud }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: sonarcloud-data
path: ${{ env.SONARCLOUD_OUTPUT_DIR }}
Expand All @@ -341,10 +343,10 @@ jobs:
if: ${{ needs.precondition.outputs.docs_only != 'true' }}
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Get core numbers
run: echo "NPROC=$(nproc)" >> $GITHUB_ENV
- uses: docker/build-push-action@v3
- uses: docker/build-push-action@v5
with:
context: .
build-args: MORE_BUILD_ARGS=-j${{ env.NPROC }}
Expand Down Expand Up @@ -438,11 +440,12 @@ jobs:
wget https://github.com/Kitware/CMake/releases/download/v3.26.4/cmake-3.26.4-linux-x86_64.sh
bash cmake-3.26.4-linux-x86_64.sh --skip-license --prefix=/usr

- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/checkout@v3 #v4 use Node 20 and not working at CentOS 7
- uses: actions/setup-go@v4 #v5 use Node 20 too
if: ${{ !startsWith(matrix.image, 'opensuse') }}
with:
go-version-file: 'tests/gocase/go.mod'
cache: false

- name: Build Kvrocks
run: |
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@ jobs:
if: github.repository_owner == 'apache'
steps:

- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Login Docker Hub
if: (github.event_name != 'pull_request')
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3

- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
Expand All @@ -53,15 +53,15 @@ jobs:

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: apache/kvrocks
flavor: latest=false
tags: |
type=sha,prefix=nightly-{{date 'YYYYMMDD'}}-,format=short
type=raw,value=nightly

- uses: docker/build-push-action@v3
- uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64, linux/arm64
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/sonar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ jobs:
runs-on: ubuntu-22.04
if: github.event.workflow_run.conclusion == 'success' && github.repository_owner == 'apache'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: ${{ github.event.workflow_run.head_repository.full_name }}
ref: ${{ github.event.workflow_run.head_sha }}
fetch-depth: 0
- name: Install sonar-scanner and build-wrapper
uses: SonarSource/sonarcloud-github-c-cpp@v2
- name: 'Download code coverage'
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
Expand All @@ -60,7 +60,7 @@ jobs:
unzip sonarcloud-data.zip -d sonarcloud-data
ls -a sonarcloud-data

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Configure Kvrocks
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ include(cmake/fmt.cmake)
include(cmake/jsoncons.cmake)
include(cmake/xxhash.cmake)
include(cmake/span.cmake)
include(cmake/trie.cmake)

if (ENABLE_LUAJIT)
include(cmake/luajit.cmake)
Expand Down Expand Up @@ -169,6 +170,7 @@ list(APPEND EXTERNAL_LIBS Threads::Threads)
list(APPEND EXTERNAL_LIBS ${Backtrace_LIBRARY})
list(APPEND EXTERNAL_LIBS xxhash)
list(APPEND EXTERNAL_LIBS span-lite)
list(APPEND EXTERNAL_LIBS tsl_hat_trie)

# Add git sha to version.h
find_package(Git REQUIRED)
Expand Down
1 change: 1 addition & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ The text of each license is also included in licenses/LICENSE-[project].txt
* fmt(https://github.com/fmtlib/fmt)
* LuaJIT(https://github.com/KvrocksLabs/LuaJIT)
* lua(https://github.com/KvrocksLabs/lua, alternative to LuaJIT)
* hat-trie(https://github.com/Tessil/hat-trie)

================================================================
Boost Software License Version 1.0
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ Apache Kvrocks is licensed under the Apache License Version 2.0. See the [LICENS
## Social Media

- [Medium](https://kvrocks.medium.com/)
- [X (Twitter)](https://twitter.com/apache_kvrocks)
- [Zhihu](https://www.zhihu.com/people/kvrocks) (in Chinese)
- WeChat Official Account (in Chinese, scan the QR code to follow)

Expand Down
4 changes: 2 additions & 2 deletions cmake/fmt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ include_guard()
include(cmake/utils.cmake)

FetchContent_DeclareGitHubWithMirror(fmt
fmtlib/fmt 10.1.1
MD5=2a91a7d74be8bfd3a19e7e2abbc7c034
fmtlib/fmt 10.2.1
MD5=1bba4e8bdd7b0fa98f207559ffa380a3
)

FetchContent_MakeAvailableWithArgs(fmt)
4 changes: 2 additions & 2 deletions cmake/jsoncons.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ include_guard()
include(cmake/utils.cmake)

FetchContent_DeclareGitHubWithMirror(jsoncons
danielaparker/jsoncons v0.172.0
MD5=2bc70a1ddc8c5fc96d43c0cb4d10dfa0
danielaparker/jsoncons v0.173.4
MD5=947254529a8629d001322a78454a23d2
)

FetchContent_MakeAvailableWithArgs(jsoncons
Expand Down
4 changes: 2 additions & 2 deletions cmake/rocksdb.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ endif()
include(cmake/utils.cmake)

FetchContent_DeclareGitHubWithMirror(rocksdb
facebook/rocksdb v8.10.0
MD5=ed06e98fae30c29cceacbfd45a316f06
facebook/rocksdb v8.10.2
MD5=2155ffb638bfcf42b31818b00d9a3005
)

FetchContent_GetProperties(jemalloc)
Expand Down
4 changes: 2 additions & 2 deletions cmake/span.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ include_guard()
include(cmake/utils.cmake)

FetchContent_DeclareGitHubWithMirror(span
martinmoene/span-lite v0.10.3
MD5=ee5c6721d4f4f56a6e6f250c68ad4132
martinmoene/span-lite v0.11.0
MD5=9786933d03cda33ac7dccbfe85f771dd
)

FetchContent_MakeAvailableWithArgs(span)
4 changes: 2 additions & 2 deletions cmake/speedb.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ endif()
include(cmake/utils.cmake)

FetchContent_DeclareGitHubWithMirror(speedb
speedb-io/speedb speedb/v2.7.0
MD5=9603a0921deb4e3cd9046cf7e9288485
speedb-io/speedb speedb/v2.8.0
MD5=3da818408057c8c818bfc9adc40d929f
)

FetchContent_GetProperties(jemalloc)
Expand Down
27 changes: 27 additions & 0 deletions cmake/trie.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

include_guard()

include(cmake/utils.cmake)

FetchContent_DeclareGitHubWithMirror(trie
Tessil/hat-trie 906e6abd1e7063f1dacd3a6b270aa654b525eb0a
MD5=a930364e9f6b60371319664bddf78000
)

FetchContent_MakeAvailableWithArgs(trie)
29 changes: 25 additions & 4 deletions kvrocks.conf
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ max-bitmap-to-string-mb 16
# If enabled, the cursor will be unsigned 64-bit integers.
# If disabled, the cursor will be a string.
# Default: no
redis-cursor-compatible no
redis-cursor-compatible yes

# Whether to enable the RESP3 protocol.
# NOTICE: RESP3 is still under development, don't enable it in production environment.
Expand Down Expand Up @@ -536,6 +536,16 @@ compaction-checker-range 0-7
# rename-command KEYS ""

################################ MIGRATE #####################################
# Slot migration supports two ways:
# - redis-command: Migrate data by redis serialization protocol(RESP).
# - raw-key-value: Migrate the raw key value data of the storage engine directly.
# This way eliminates the overhead of converting to the redis
# command, reduces resource consumption, improves migration
# efficiency, and can implement a finer rate limit.
#
# Default: redis-command
migrate-type redis-command

# If the network bandwidth is completely consumed by the migration task,
# it will affect the availability of kvrocks. To avoid this situation,
# migrate-speed is adopted to limit the migrating speed.
Expand All @@ -562,6 +572,18 @@ migrate-pipeline-size 16
# Default: 10000
migrate-sequence-gap 10000

# The raw-key-value migration way uses batch for migration. This option sets the batch size
# for each migration.
#
# Default: 16kb
migrate-batch-size-kb 16

# Rate limit for migration based on raw-key-value, representing the maximum number of data
# that can be migrated per second. 0 means no limit.
#
# Default: 16M
migrate-batch-rate-limit-mb 16

################################ ROCKSDB #####################################

# Specify the capacity of column family block cache. A larger block cache
Expand Down Expand Up @@ -700,8 +722,7 @@ rocksdb.block_size 16384
# Default: yes
rocksdb.cache_index_and_filter_blocks yes

# Specify the compression to use. Only compress level greater
# than 2 to improve performance.
# Specify the compression to use.
# Accept value: "no", "snappy", "lz4", "zstd", "zlib"
# default snappy
rocksdb.compression snappy
Expand Down Expand Up @@ -837,7 +858,7 @@ rocksdb.read_options.async_io no
# buffer cache before the write is considered complete.
# If this flag is enabled, writes will be slower.
# If this flag is disabled, and the machine crashes, some recent
# rites may be lost. Note that if it is just the process that
# writes may be lost. Note that if it is just the process that
# crashes (i.e., the machine does not reboot), no writes will be
# lost even if sync==false.
#
Expand Down
21 changes: 21 additions & 0 deletions licenses/LICENSE-hat-trie.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017 Thibaut Goetghebuer-Planchon <tessil@gmx.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading
Loading