Comments (3)
Thanks. I've tested with both Redis 5 and 6, and both work just fine now.
from test-redisserver.
Thanks for the report. I have also seen the report to Redis itself and understand the situation.
There are several possible ways to do this.
- Try SIGTERM a few times, and if it doesn't work, send SIGKILL.
- Good: This is a common practice when stopping a daemon process
- Good: It is relatively easy to implement.
- Bad: It's a bit rough.
- Good: However, it will definitely stop the process, not just in this case.
- Check for the existence of the directory when stopping, and if it is not found, perform
CONFIG SET appendonly no
,CONFIG SET save ""
, and then stop the process (SIGTERM).- Good: This is the most correct method for this case.
- Bad?: It's a good idea to set appendonly as well, but I can't guarantee that it will work on versions earlier than 1.1 that don't support it.
- However, I don't think we should guarantee that older versions will work.
- Bad: We need to add more runtime dependencies such as
Redis.pm
to issue commands to redis.
- Don't use CLEANUP => 1 for implicit tmpdir creation in new, delete tmpdir by itself on stop.
- Good?: Delete tmpdir on stop only if it is not passed to the constructor. In this case, if we explicitly pass a tmpdir with
CLEANUP => 1
to the constructor, we may face the same problem as in this issue, but I don't think there are many use cases for that.- It's not a good idea to delete tmpdir all together, because sometimes we don't want it to be deleted for exapmle debugging purposes
- Bad: It's a work-around, and it's tricky to read and understand the code.
- Good?: Delete tmpdir on stop only if it is not passed to the constructor. In this case, if we explicitly pass a tmpdir with
Let me think some more about what to do. Your pull requests are also welcome.
from test-redisserver.
I have implemented the above 2 methods. I was also able to write a test that reproduced the situation, so I was able to solve the problem. ref. #15
from test-redisserver.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from test-redisserver.