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

Summary:activeExpireCycleTryExpire use dbDelete #7007

Open
wants to merge 5 commits into
base: 6.0
Choose a base branch
from

Conversation

xiaozhitaba
Copy link

BranchName: 6.0
CAFID: 0
BUGID: 0
WorkPackageName: redis
The ratio of self research code(0~1): 1

BranchName: 6.0
CAFID: 0
BUGID: 0
WorkPackageName: redis
The ratio of self research code(0~1): 1
@xiaozhitaba
Copy link
Author

why not use dbDelete in activeExpireCycleTryExpire function

      Linux Kernel 2.6.37中增加了一个叫做TCP_USER_TIMEOUT的socket选项 http://stackoverflow.com/questions/5907527/application-control-of-tcp-retransmission-on-linux
      tcp keepalive 需要和 TCP_USER_TIMEOUT 配合使用,解决不能及时响应 tcp 断开事件
BranchName: 6.0
CAFID: 0
BUGID: 0
WorkPackageName: xiaozhi-redis-6.0
The ratio of self research code(0~1): 1
@xiaozhitaba
Copy link
Author

TCP_USER_TIMEOUT is needed

@xiaozhitaba xiaozhitaba reopened this Mar 19, 2020
BranchName: 6.0
CAFID: 0
BUGID: 9
WorkPackageName: xiaozhi-redis
The ratio of self research code(0~1): 1
@xiaozhitaba
Copy link
Author

SOCK_CLOEXEC need include <linux/tcp.h>

@xiaozhitaba
Copy link
Author

CI / build-macos-latest (pull_request) Failing after 45s
MAKE hiredis
cd hiredis && /Applications/Xcode_11.3.1.app/Contents/Developer/usr/bin/make static
cc -std=c99 -pedantic -c -O3 -fPIC -I/usr/local/opt/openssl/include -Wall -W -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers -g -ggdb net.c
net.c:44:10: fatal error: 'linux/tcp.h' file not found
#include <linux/tcp.h>

in my environment is ok

MAKE hiredis
cd hiredis && make static
make[3]: Entering directory '/root/redis/deps/hiredis'
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers -g -ggdb net.c
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers -g -ggdb hiredis.c
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers -g -ggdb sds.c
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers -g -ggdb async.c
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers -g -ggdb read.c
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers -g -ggdb sockcompat.c
ar rcs libhiredis.a net.o hiredis.o sds.o async.o read.o sockcompat.o
make[3]: Leaving directory '/root/redis/deps/hiredis'

why @antirez @antirez

@xiaozhitaba
Copy link
Author

I know macos does not have linux/tcp.h
but how to resolve this ? @ @antirez please help me

BranchName: 6.0
CAFID: 0
BUGID: 0
WorkPackageName: xiaozhi-redis
The ratio of self research code(0~1): 1
@antirez
Copy link
Contributor

antirez commented Mar 23, 2020

Hello @xiaozhitaba! Too many changes in the same PR ;-D The dbDelete() thing is ok however. Please could you submit different changes in different PRs? Thanks.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants