Skip to content

Commit

Permalink
treewide: 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zeriyoshi committed Nov 9, 2021
2 parents 5542021 + 894d783 commit 3e7553a
Show file tree
Hide file tree
Showing 82 changed files with 2,915 additions and 757 deletions.
45 changes: 45 additions & 0 deletions .clang-format.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This may be useful with https://clang.llvm.org/docs/ClangFormat.html#script-for-patch-reformatting
# but some of clang's reformattings may conflict with notes/c-style-guide.txt, which takes precedence.
#
# This is deliberately named .clang-format.example instead of .clang-format to avoid editors
# unexpectedly using this to reformatting entire files because of these shortcomings.
# It can be copied into .clang-format to use this for local development selectively.
#
# Note: this clang format file has many shortcomings.
# Attempting to apply this automatically to everything may make code less readable.
# However, this may be useful for spot checking new code,
# or if you're not certain of indentation style or general spacing/wrapping rules
#
# Known shortcomings:
# - Some places exceed the 80 column limit deliberately for readability, e.g. help strings or error messages or function prototypes. (BreakStringLiterals helps preserve some of those)
# - Some places deliberately put blocks on a single line when there are a lot of similar blocks.
# AllowShortBlocksOnASingleLine is not useful.
# - Some places deliberately put blocks on a single line when there are a lot of similar blocks.
# - No good way to eliminate space before and after PRIu64 and other macros for adjacent string literal concatenation
# - clang-format is not aware of macros, some of which have different styles from functions.
# - Function declarations are not typically aligned
# - Some variable declarations are aligned and others aren't on a case by case basis
# - The choice of function argument grouping should depends on which function arguments are semantically related,
# not just on fitting within 80 columns.

AllowShortBlocksOnASingleLine: true
BasedOnStyle: LLVM
AlwaysBreakAfterDefinitionReturnType: All
UseTab: Never
IndentWidth: 4
TabWidth: 4
ColumnLimit: 80
BreakBeforeBraces: Linux
SortIncludes: false

BreakStringLiterals: false
# BitFieldColonSpacing is too new to work in clang-format 11
# https://releases.llvm.org/11.0.0/tools/clang/docs/ClangFormatStyleOptions.html
# Latest: https://clang.llvm.org/docs/ClangFormatStyleOptions.html
#
# BitFieldColonSpacing: None
#
# XXX no way to treat the `*` indicating a value is a pointer as part of the aligned name for the declaration
# XXX function declarations are not typically aligned
AlignConsecutiveDeclarations: true
AlignConsecutiveMacros: true
57 changes: 57 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Dockerfile*
**/Dockerfile*
*.gz
src/nutredis
src/nutcracker
tests/_binaries/*

### Entries copied from .gitignore
# pyc
*.pyc

# Compiled Object files
*.lo
*.o

# Compiled Dynamic libraries
*.so

# Compiled Static libraries
*.la
*.a

# Compiled misc
*.dep
*.gcda
*.gcno
*.gcov

# Packages
*.tar.gz
*.tar.bz2

# Logs
*.log

# Temporary
*.swp
*.~
*.project
*.cproject

# Core and executable
core*
nutcracker

# extracted yaml
!/contrib/yaml-0.2.5.tar.gz

# Autotools
.deps
.libs

/aclocal.m4
/autom4te.cache
/stamp-h1
/autoscan.log
/libtool
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# https://editorconfig.org/

root = true

[*]
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
charset = utf-8

# See twemproxy/notes/c-styleguide.txt
[*.c,*.h]
tab_width = 4
indent_size = 4
indent_style = space
# indent_brace_style depends on function vs conditional
max_line_length = 80
spaces_around_brackets = none
spaces_around_operators = true
42 changes: 42 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# See https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-environment-variables-in-a-matrix
strategy:
# Run to completion even if one redis version has failures
fail-fast: false
matrix:
include:
- REDIS_VER: 3.0.7
- REDIS_VER: 3.2.13
- REDIS_VER: 4.0.14
- REDIS_VER: 5.0.12
- REDIS_VER: 6.2.4

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Runs a single command using the runners shell
- name: Build and test in docker
run: bash ./test_in_docker.sh ${{ matrix.REDIS_VER }}
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ core*
nutcracker

# extracted yaml
!/contrib/yaml-0.1.4.tar.gz
!/contrib/yaml-0.2.5.tar.gz

# Autotools
.deps
Expand Down Expand Up @@ -66,3 +66,11 @@ nutcracker

Makefile
Makefile.in

# The .clang-format.example file may be copied here for use with -style=file
.clang-format

test_all
*.trs
tags

44 changes: 43 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,46 @@
2021-13-07 Tyson Andre <[email protected]>
* twemproxy: version 0.5.0 release
Same as 0.5.0-RC1

2021-06-07 Tyson Andre <[email protected]>
* twemproxy: version 0.5.0-RC1 release
Add 'tcpkeepalive' pool boolean config flag setting
to enable tcp keepalive (charsyam, manju)
Support redis bitpos command (clark kang)
Fix parsing of redis error response for error type with no space,
add tests (tyson, tom dalton)
Update integration tests, add C unit test suite for 'make check' (tyson)
Increase the maximum host length+port+identifier to 273
in ketama_update (李广博)
Always initialize file permissions field when listening on a unix domain
socket (tyson)
Use number of servers instead of number of points on the continuum when
sharding requests to backend services to improve sharding performance
and fix potential invalid memory access when all hosts were ejected
from a pool. (tyson)
Optimize performance of deletion of single redis keys (vincentve)
Don't fragment memcache/redis get commands when they only have a single
key (improves performance and error handling of single key case) (tyson)
Don't let requests hang when there is a dns error when processing a
fragmented request (e.g. multiget with multiple keys) (tyson)
Allow extra parameters for redis spop (charsyam)
Update documentation and README (various)
Fix memory leak bug for redis mset (deep011)
Support arbitrarily deep nested redis multi-bulk
responses (nested arrays) (qingping209, tyson)
Upgrade from libyaml 0.1.4 to 0.2.5 (tyson)
Fix compiler warnings about wrong conversion specifiers in format
strings for logging (tyson)
Log the async backend used and any debug options in the
'--help'/'--version' output.
Add support for many more new redis commands and updates to existing
redis commands (tyson)
Optimization: Skip hashing and choosing server index when a pool has
exactly one server (tyson)
Support memcache 'version' requests by proxying the request to a single
backend memcache server to fetch the server version. (tyson)
Make error messages for creating the stats server during startup clearer. (tyson)

2015-22-06 Manju Rajashekhar <[email protected]>
* twemproxy: version 0.4.1 release
backend server hostnames are resolved lazily
Expand All @@ -9,7 +52,6 @@
implemented support for parsing fine grained redis error response
remove redundant conditional judgement in rbtree deletion (leo ma)
fix bug mset has invalid pair (charsyam)
fix bug mset has invalid pair (charsyam)
temp fix a core on kqueue (idning)
support "touch" command for memcached (panmiaocai)
fix redis parse rsp bug (charsyam)
Expand Down
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM gcc

COPY . /usr/src/twemproxy
WORKDIR /usr/src/twemproxy
RUN \
autoreconf -h && \
autoreconf -fvi && \
./configure && \
make && \
make install

ENTRYPOINT [ "nutcracker" ]
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

The source also includes libyaml (yaml-0.1.4) in contrib/ directory
The source also includes libyaml (yaml-0.2.5) in contrib/ directory

Copyright (c) 2006 Kirill Simonov

Expand Down
Loading

0 comments on commit 3e7553a

Please sign in to comment.