Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Qihoo360/floyd
Browse files Browse the repository at this point in the history
* 'master' of github.com:Qihoo360/floyd:
  Update README.md
  Modify redis protocol; Update Makefile
  • Loading branch information
baotiao committed Oct 15, 2017
2 parents 2c9417f + f93a7e9 commit ffbcb44
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 17 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ make && sh run.sh

A simple consensus kv example contain server and client builded with floyd

## Test
floyd has pass the jepsen test, you can get the test case here
[jepsen](https://github.com/gaodq/jepsen)

## Documents
* [Wikis](https://github.com/Qihoo360/floyd/wiki)

Expand Down
4 changes: 1 addition & 3 deletions floyd/example/redis/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CXX = g++
ifeq ($(__PERF), 1)
CXXFLAGS = -O0 -g -pg -pipe -fPIC -DNDEBUG -DLOG_LEVEL=LEVEL_INFO -W -Wwrite-strings -Wpointer-arith -Wreorder -Wswitch -Wsign-promo -Wredundant-decls -Wformat -Wall -D_GNU_SOURCE -std=c++11 -D__STDC_FORMAT_MACROS -std=c++11 -gdwarf-2 -Wno-redundant-decls -Wno-unused-variable -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -DOS_LINUX
else
CXXFLAGS = -pg -g -O2 -ggdb3 -pipe -fPIC -W -Wwrite-strings -Wpointer-arith -Wreorder -Wswitch -Wsign-promo -Wredundant-decls -Wformat -D_GNU_SOURCE -D__STDC_FORMAT_MACROS -std=c++11 -gdwarf-2 -Wno-redundant-decls -Wno-unused-variable -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -DOS_LINUX
CXXFLAGS = -g -O2 -ggdb3 -pipe -fPIC -W -Wwrite-strings -Wpointer-arith -Wreorder -Wswitch -Wsign-promo -Wredundant-decls -Wformat -D_GNU_SOURCE -D__STDC_FORMAT_MACROS -std=c++11 -gdwarf-2 -Wno-redundant-decls -Wno-unused-variable -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -DOS_LINUX
endif

ifndef SLASH_PATH
Expand Down Expand Up @@ -53,8 +53,6 @@ LIBS = -lfloyd \
-lz \
-lbz2 \
-lrt \
-lssl \
-lcrypto \
-lpthread

INCLUDE_PATH = -I../../../ \
Expand Down
2 changes: 0 additions & 2 deletions floyd/example/redis/clean_raftis

This file was deleted.

4 changes: 2 additions & 2 deletions floyd/example/redis/raftis.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ int MyConn::DealMessage() {
if (s.IsNotFound()) {
val = "0"; // default value for jepsen
}
memcpy(wbuf_ + wbuf_len_, "*1\r\n$", 5);
wbuf_len_ += 5;
memcpy(wbuf_ + wbuf_len_, "$", 1);
wbuf_len_ += 1;
std::string len = std::to_string(val.length());
memcpy(wbuf_ + wbuf_len_, len.data(), len.size());
wbuf_len_ += len.size();
Expand Down
4 changes: 0 additions & 4 deletions floyd/example/redis/start_raftis

This file was deleted.

6 changes: 0 additions & 6 deletions floyd/example/redis/stop_raftis

This file was deleted.

0 comments on commit ffbcb44

Please sign in to comment.