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

Feature/redis 5.0 #1756

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
339c3ad
add .gitattributes file
pingfan108 Nov 29, 2020
9b43c59
[server] add redis 5.0.10, which aligned with redis commit: a767d84a7
pingfan108 Nov 29, 2020
5d9ad4d
[server] create patch directory and add patch tools for redis 5.0
pingfan108 Nov 29, 2020
1795dc5
[server] apply codis patch, implement the basic operations of codis s…
pingfan108 Nov 29, 2020
786bd2a
[server] fix the active defrag unittest failure
pingfan108 Nov 29, 2020
7138645
[server] apply codis patch, optimize incrementallyRehash()
pingfan108 Nov 29, 2020
a3375c2
[server][test] add testing cases for the basic logic of codis hash slot
pingfan108 Nov 30, 2020
aec3a15
[server] store the modified codis patch: 0000-basic.patch
pingfan108 Nov 30, 2020
902570b
[server] apply codis patch, add SLOTSSCAN command
pingfan108 Nov 30, 2020
f794948
[server] store the modified codis patch: 0001-slotsscan.patch
pingfan108 Nov 30, 2020
f620adb
[server][test] create smoketest suite for codis and add first case
pingfan108 Nov 30, 2020
dafb1fc
[server][test] add more test cases for codis sync migration
pingfan108 Nov 30, 2020
9ec4632
[server] store the new codis patch: 0002-slots_sync_test.patch
pingfan108 Nov 30, 2020
6713bda
[server] apply codis patch, the basic implementation of async migration
pingfan108 Dec 1, 2020
7b2462a
[server] apply codis patch, add SLOTSMGRT-ASYNC-STATUS command
pingfan108 Dec 1, 2020
61491b5
[server] apply codis patch, improve the free method of chunked objects
pingfan108 Dec 1, 2020
9428676
[server] apply codis patch, fix the panic when migrating expired key
pingfan108 Dec 1, 2020
d54f3f3
[server] apply codis patch, add SLOTSRESTORE-ASYNC-SELECT command
pingfan108 Dec 1, 2020
88f04d5
[server] remove the lazy release implementation in codis async migration
pingfan108 Dec 3, 2020
195c287
[server] store the modified codis patch: 0003-slots_async.patch
pingfan108 Dec 3, 2020
80b9e98
[server] supplement the help info for the new added codis commands
pingfan108 Dec 3, 2020
9c5f831
[server] store the new codis patch: 0004-slots_help.patch
pingfan108 Dec 3, 2020
a27a8ce
[server][test] add unit/codis to the all_tests list in redis test suite
pingfan108 Dec 6, 2020
cf5906e
[server][test] add cases for codis single key async migration
pingfan108 Dec 6, 2020
7a6129f
[server][test] add cases for codis hash slot async migration
pingfan108 Dec 6, 2020
0ef768c
[server][test] add cases for async migration's parameter verification
pingfan108 Dec 6, 2020
b0633d4
[server][test] add cases for SLOTSMGRT-EXEC-WRAPPER command
pingfan108 Dec 6, 2020
269834c
[server][test] add redis-sentinel in codis's smoketest enviroment
pingfan108 Dec 6, 2020
c3ba73e
[server][test] add failover cases for codis async migration
pingfan108 Dec 6, 2020
38a3c3c
[server][test] Makefile target for test-codis added
pingfan108 Dec 6, 2020
a50b5f7
[server] store the new codis patch: 0005-slots_async_test.patch
pingfan108 Dec 6, 2020
fe739ee
[server] upgrade codis-server from redis 3.2.11 to redis 5.0
pingfan108 Dec 6, 2020
13f037c
rm config files(which generated by make) from git
pingfan108 Dec 6, 2020
dd30825
[server] store the files which are required by jemalloc but are omitted
pingfan108 Jan 11, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
29 changes: 29 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Explicitly declare text files that you want to always be normalized
# and converted to native line endings on checkout.
*.c text diff=cpp
*.h text diff=cpp
*.go text diff=golang
*.py text diff=python
*.sh text
*.md text diff=markdown
*.tcl text
*.tex text diff=tex
*.txt text
*.xml text
*.yml text
*.json text

# Declare files that will always have CRLF line endings on checkout.
*.bat text eol=crlf
*.sln text eol=crlf

# Denote all files that are truly binary and should not be modified.
*.rdb binary
*.jpg binary
*.png binary

# Treat all files that under these dirs as binaries and won't modify.
**/*deprecated/** binary
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
*.log
*.swp
*.sw*
*.out
*.dump
*.log.*
Expand All @@ -10,6 +10,7 @@
.htaccess

/bin
/config
/tmp
/pkg/utils/version.go

Expand Down
25 changes: 14 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
.DEFAULT_GOAL := build-all

export GO15VENDOREXPERIMENT=1
REDIS_VER="5.0"

build-all: codis-server codis-dashboard codis-proxy codis-admin codis-ha codis-fe clean-gotest

codis-deps:
deps:
@mkdir -p bin config && bash version

codis-deps: deps
@make --no-print-directory -C vendor/github.com/spinlock/jemalloc-go/

codis-dashboard: codis-deps
Expand All @@ -26,26 +29,26 @@ codis-fe: codis-deps
go build -i -o bin/codis-fe ./cmd/fe
@rm -rf bin/assets; cp -rf cmd/fe/assets bin/

codis-server:
@mkdir -p bin
codis-server: deps
@rm -f bin/codis-server*
make -j4 -C extern/redis-3.2.11/
@cp -f extern/redis-3.2.11/src/redis-server bin/codis-server
@cp -f extern/redis-3.2.11/src/redis-benchmark bin/
@cp -f extern/redis-3.2.11/src/redis-cli bin/
@cp -f extern/redis-3.2.11/src/redis-sentinel bin/
@cp -f extern/redis-3.2.11/redis.conf config/
@sed -e "s/^sentinel/# sentinel/g" extern/redis-3.2.11/sentinel.conf > config/sentinel.conf
make -j4 -C extern/redis-$(REDIS_VER)/
@cp -f extern/redis-$(REDIS_VER)/src/redis-server bin/codis-server
@cp -f extern/redis-$(REDIS_VER)/src/redis-benchmark bin/
@cp -f extern/redis-$(REDIS_VER)/src/redis-cli bin/
@cp -f extern/redis-$(REDIS_VER)/src/redis-sentinel bin/
@cp -f extern/redis-$(REDIS_VER)/redis.conf config/
@sed -e "s/^sentinel/# sentinel/g" extern/redis-$(REDIS_VER)/sentinel.conf > config/sentinel.conf

clean-gotest:
@rm -rf ./pkg/topom/gotest.tmp

clean: clean-gotest
@rm -rf bin
@rm -rf config
@rm -rf scripts/tmp

distclean: clean
@make --no-print-directory --quiet -C extern/redis-3.2.11 distclean
@make --no-print-directory --quiet -C extern/redis-$(REDIS_VER) distclean
@make --no-print-directory --quiet -C vendor/github.com/spinlock/jemalloc-go/ distclean

gotest: codis-deps
Expand Down
40 changes: 0 additions & 40 deletions config/dashboard.toml

This file was deleted.

114 changes: 0 additions & 114 deletions config/proxy.toml

This file was deleted.

30 changes: 30 additions & 0 deletions extern/redis-5.0/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.*.swp
*.o
*.log
dump.rdb
redis-benchmark
redis-check-aof
redis-check-rdb
redis-check-dump
redis-cli
redis-sentinel
redis-server
doc-tools
release
misc/*
src/release.h
appendonly.aof
SHORT_TERM_TODO
release.h
src/transfer.sh
src/configs
redis.ds
src/redis.conf
src/nodes.conf
deps/lua/src/lua
deps/lua/src/luac
deps/lua/src/liblua.a
.make-*
.prerequisites
*.dSYM
Makefile.dep
Loading