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

Merge upstream 0.5.0 #9

Open
wants to merge 105 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
2c1567b
Initial version Dockerfile.
pataquets Mar 29, 2017
a2159df
fix list indentation
essanpupil Nov 13, 2017
85fb83f
Initialize file permissions field for unix domain socket
TysonAndre Dec 19, 2017
e350a6e
Improve formatting of README file
Jan 2, 2019
fc02f09
Fix README typo
raghukul01 Feb 26, 2019
62b724a
Merge branch 'master' of github.com:twitter/twemproxy
pataquets May 13, 2019
c6cc79a
Merge pull request #524 from pataquets/master
manjuraj Nov 5, 2020
48e3f39
Merge pull request #571 from raghukul01/master
manjuraj Nov 5, 2020
a575ab2
Add a clang-format file approximating the c style guide
TysonAndre May 11, 2021
f68f86c
Fix typo in c style guide
TysonAndre May 11, 2021
0421ad3
[skip ci] Add .editorconfig
TysonAndre May 11, 2021
1fde0f4
Merge pull request #602 from ifwe/twitter-editorconfig
manjuraj May 12, 2021
973ef77
Fix failing unit tests, run in Docker
TysonAndre Apr 9, 2021
3140cda
Add nosetests_verbose.sh script
TysonAndre Apr 9, 2021
96a9fbd
Remove accidentally committed file
TysonAndre Apr 9, 2021
e25f23e
Start using github workflow to build branches and PRs
TysonAndre Apr 9, 2021
d224107
Fix second check
TysonAndre Apr 9, 2021
8caa0a2
Update test of auth for redis 6+
TysonAndre Apr 9, 2021
5c2a373
Merge pull request #598 from ifwe/update-unit-tests
TysonAndre Jun 30, 2021
0667d61
Don't hang for dns error responding to fragmented requests
TysonAndre Mar 19, 2021
05032ce
Switch to GitHub actions for builds
TysonAndre Jun 30, 2021
95e8de5
Merge pull request #607 from twitter/twitter-switch-github-actions
TysonAndre Jun 30, 2021
eca60d6
Merge pull request #597 from ifwe/twitter-dns-lookup-error-tolerance
TysonAndre Jun 30, 2021
f96e354
Merge pull request #601 from ifwe/twitter-clangformat
TysonAndre Jun 30, 2021
8ebfd61
Use nservers instead of ncontinuum
TysonAndre Feb 24, 2021
3558a39
Don't fragment memcache get commands with a single key
TysonAndre Apr 9, 2021
14bac40
Follow c style guide
TysonAndre Jun 30, 2021
0984586
Merge pull request #595 from ifwe/twitter-use-nservers-instead-of-nco…
TysonAndre Jun 30, 2021
d81d8c4
Merge pull request #545 from TysonAndre/unset-perm-twitter
TysonAndre Jun 30, 2021
cb81d61
FIX: increase the host length to 273 in ketama_update, check the host…
Nov 22, 2018
25d540d
Add various unit tests and integration tests
TysonAndre Jul 1, 2021
0b98d99
Sync changes to Dockerfile, install redis-py 3.5.3
TysonAndre Jul 1, 2021
cb6c564
Merge pull request #610 from ifwe/twitter-add-unit-test
TysonAndre Jul 1, 2021
b97f720
Fix parsing of error message without space
TysonAndre May 1, 2021
7a4e7ad
Update changelog entries
TysonAndre Jul 1, 2021
ace7c2d
Merge pull request #611 from ifwe/twitter-fix-redis-err-no-space
TysonAndre Jul 1, 2021
77f033a
Support various commands from newer redis versions
TysonAndre Apr 15, 2021
4b81d66
Remove BITOP operation destkey key ..., add missing command parser
TysonAndre Apr 16, 2021
c71cb03
Update docs
TysonAndre Apr 16, 2021
2e4f1c7
Merge pull request #599 from ifwe/twitter-support-more-commands
TysonAndre Jul 1, 2021
f08bcfc
Make twemproxy able to parse nested multibulks
qingping209 May 1, 2021
f387657
Add c unit test of multi-bulk result parsing
TysonAndre May 1, 2021
621e7d6
Support arbitrarily nested redis multibulks
TysonAndre Jul 1, 2021
523348f
Update the changelog
TysonAndre Jul 1, 2021
746216c
Merge pull request #612 from ifwe/twitter-fix-multibulk
TysonAndre Jul 1, 2021
7e131f8
Followup for new redis commands and multibulk support
TysonAndre Jul 1, 2021
6006065
Merge pull request #613 from ifwe/twitter-support-new-redis-commands-…
TysonAndre Jul 1, 2021
3f7cc0c
Update libyaml to 0.2.5, strictly check compiler warnings in CI
TysonAndre Jul 1, 2021
709de01
Fix compilation warnings about log sprintf format strings
TysonAndre Jul 1, 2021
1239ef9
[skip ci] Update documentation of supported redis commands
TysonAndre Jul 1, 2021
db2e642
Merge pull request #615 from ifwe/twitter-update-checks
TysonAndre Jul 1, 2021
9258716
[skip ci] Add script to extract redis key/arg count ranges
TysonAndre Jul 1, 2021
c741bf1
Merge pull request #616 from twitter/extract_redis_commands_argcounts
TysonAndre Jul 1, 2021
34dcc49
Fix a crash seen when logging redis `COMMAND` in recent patches
TysonAndre Jul 2, 2021
67e1124
Merge pull request #619 from twitter/fix-logging-crash
TysonAndre Jul 2, 2021
cb0db33
Merge pull request #541 from essanpupil/master
TysonAndre Jul 2, 2021
2e28feb
[skip ci] Remove reference to outdated python-memcached version
TysonAndre Jul 2, 2021
d486c11
Merge pull request #622 from twitter/python-memcached-outdated
TysonAndre Jul 2, 2021
42c2a1d
Merge pull request #570 from erikwebb/patch-1
TysonAndre Jul 2, 2021
9022647
Update tests
TysonAndre Jul 2, 2021
4b33ca8
Merge pull request #623 from twitter/update-tests
TysonAndre Jul 3, 2021
d627f53
Make pointers const qualified where possible
TysonAndre Jul 2, 2021
35ee7a3
Add more const flags
TysonAndre Jul 2, 2021
ef03bf9
Add constant qualifiers.
TysonAndre Jul 3, 2021
ca2683f
Update tests
TysonAndre Jul 3, 2021
0440112
Make static variables const where usage is const
TysonAndre Jul 3, 2021
abb3623
Add more const annotations
TysonAndre Jul 3, 2021
219d167
Add const qualifier
TysonAndre Jul 3, 2021
b7177ba
Use the renamed redis repo url in CI docker build
TysonAndre Jul 3, 2021
9339bcf
Merge pull request #628 from twitter/const-values
TysonAndre Jul 3, 2021
a5e58a4
Log the async event backend used in the version/help output
TysonAndre Jul 3, 2021
60252e1
Skip hashing and dispatching keys for single server pools
TysonAndre Jul 3, 2021
da3c4b4
Update ChangeLog
TysonAndre Jul 3, 2021
82c2052
Merge pull request #629 from twitter/logging-improvement
TysonAndre Jul 3, 2021
50b6c8d
Avoid warning about implicit loss of precision in clang
TysonAndre Jul 3, 2021
85f9875
Merge pull request #630 from twitter/clang-warning
TysonAndre Jul 3, 2021
84733fc
Support memcache 'version' request, add memcache tests
TysonAndre Jul 3, 2021
1165675
Merge pull request #632 from twitter/support-memcache-version
TysonAndre Jul 3, 2021
848d7c1
Test edge cases of parsing memcache/redis protocol
TysonAndre Jul 3, 2021
1653924
Merge pull request #634 from twitter/test
TysonAndre Jul 3, 2021
4bd87c0
Update the changelog
TysonAndre Jul 3, 2021
c3639c5
Merge pull request #635 from twitter/update-changelog
TysonAndre Jul 3, 2021
f95c0ab
Fix possible crash copying malformed memcache value responses
TysonAndre Jul 4, 2021
4700e93
Merge pull request #636 from twitter/fix-bulk-parsing
TysonAndre Jul 4, 2021
2d49179
Make error messages starting the stats server clearer
TysonAndre Jul 4, 2021
be8fa00
[skip ci] Update README descriptions of distributions
TysonAndre Jul 4, 2021
4cb2e86
Merge pull request #637 from twitter/stats-listen
TysonAndre Jul 4, 2021
dd81b78
[skip ci] Remove outdated ppa link from README
TysonAndre Jul 4, 2021
71f9950
[skip ci] Document tcpkeepalive in README, update setting descriptions.
TysonAndre Jul 4, 2021
c26092e
Rename travis.sh to test_in_docker.sh
TysonAndre Jul 4, 2021
93f3dd9
Add instructions on running unit tests, docker checks.
TysonAndre Jul 4, 2021
0a0a1ec
Merge pull request #638 from twitter/doc-updates
TysonAndre Jul 4, 2021
b649777
[skip ci] Link to documentation of how to read stats from the stats port
TysonAndre Jul 4, 2021
fb66ae7
Adapt unit tests from redis-check.sh
TysonAndre Jul 4, 2021
9e0a11b
Update `make check` bugs reporting address to be github issues
TysonAndre Jul 4, 2021
b4f000b
[skip ci] Update documentation of ci/Dockerfile
TysonAndre Jul 4, 2021
f46d1b8
Merge pull request #639 from twitter/doc-updates
TysonAndre Jul 4, 2021
cfeb446
Add miscellaneous tests, fix compilation warnings
TysonAndre Jul 4, 2021
329e1ab
Merge pull request #641 from twitter/tests-compilation-misc
TysonAndre Jul 4, 2021
f852ffa
Create a 0.5.0-RC1 release.
TysonAndre Jul 3, 2021
3dddc2b
Merge pull request #640 from twitter/release-0.5.0-RC1
TysonAndre Jul 6, 2021
7fb53c5
[skip ci] Rephrase google drive link in README
TysonAndre Jul 6, 2021
ca45646
Release twemproxy 0.5.0
TysonAndre Jul 13, 2021
894d783
Merge pull request #643 from twitter/release-0.5.0
TysonAndre Jul 13, 2021
bf754e2
treewide: 0.5.0
zeriyoshi Nov 9, 2021
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
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

29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

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