Comments (4)
The restart issue is fixed, but we can still discuss this.
from talaria.
When we do a rollout restart or k8s decided to restart/move the workload to a different node(typical k8s operations), it is terminating the pod with a grace period of 30s(default and can be customised in the pod spec). From what i understand, k8s changes the state of pod from RUNNING to TERMINATING, this event
- detaches the pod from its load balancers and there won't be any incoming traffic to the containers from this point.
- signals a SIGTERM to the containers.
We are handling this event here(https://github.com/talariadb/talaria/blob/master/main.go#L75)
If we want to preserve the data in memory and perform the compaction job, we need to do it here. If these jobs take more time than the one defined interminationGracePeriodSeconds
, k8s will send a SIGKILL signal to all the containers.
This simplifies our graceful-shutdown steps.
- close gossip(Done)
- close the gRPC server gracefully.(Done).
https://github.com/talariadb/talaria/blob/master/internal/server/server.go#L152
These two tasks need to be done here before we close all tables.
a. Maybe waiting for a period of 5-10 sec for the in-memory data to be flushed to disk, or listen to Append() event.
b. Once this is done, we can force a single compaction task, stopping the compaction scheduler first.
from talaria.
@tardunge Hi, I just found that in fact, we have full support on graceful shutdown already: https://github.com/talariadb/talaria/pull/109/files#diff-2873f79a86c0d8b3335cd7731b0ecf7dd4301eb19a82ef7a1cba7589b5252261R76
Tbh it does not work in our envs; then I investigate why it won't work.
In short, the graceful shutdown has never worked before, whether grpc close or sqs close or compact close, because the program will exit when ctx is closed/canceled.
from talaria.
fixed at #110 (comment)
from talaria.
Related Issues (20)
- Has compatibility problems when introduced the config sink HOT 8
- When writter is nil, we should not ingest events HOT 1
- Github actions failing for integration tests on forked repositories
- Azure write failed after Sink version HOT 4
- graceful shutdown panic HOT 1
- Panic when starting: file does not exist for table
- Embedding Datafusion
- Use sync.Pool to reduce the number of memory allocations on encode HOT 1
- Add exact events ingested count HOT 2
- should we have computed columns for each table?
- Question: Why do we remove metrics `ingest.count` in a latest MR? HOT 2
- Talaria panic to auth Azure when runs on AWS HOT 8
- Talaria config is not live loaded HOT 2
- Make the error message accurate HOT 2
- Panic when force killing the process HOT 9
- Support event filter leverage by computed
- unable to append due to Unable to truncate file HOT 1
- [error] writeRequests: Unable to truncate file: "/data/eventlog/000001.vlog" error: mremap size mismatch: requested: 1074437932 got: 2147483646 HOT 2
- panic: Base level can't be zero. HOT 3
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 talaria.