mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2026-03-27 18:17:29 +01:00
Compare commits
1 Commits
fix/checkp
...
hotfix
| Author | SHA1 | Date | |
|---|---|---|---|
| ac0a4cc39a |
@@ -417,7 +417,7 @@ func (s *Server) Shutdown(ctx context.Context) {
|
|||||||
cclog.Infof("Shutdown: NATS closed (%v)", time.Since(natsStart))
|
cclog.Infof("Shutdown: NATS closed (%v)", time.Since(natsStart))
|
||||||
|
|
||||||
httpStart := time.Now()
|
httpStart := time.Now()
|
||||||
shutdownCtx, cancel := context.WithTimeout(ctx, 5*time.Second)
|
shutdownCtx, cancel := context.WithTimeout(ctx, 60*time.Second)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
if err := s.server.Shutdown(shutdownCtx); err != nil {
|
if err := s.server.Shutdown(shutdownCtx); err != nil {
|
||||||
cclog.Errorf("Server shutdown error: %v", err)
|
cclog.Errorf("Server shutdown error: %v", err)
|
||||||
@@ -440,7 +440,7 @@ func (s *Server) Shutdown(ctx context.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
wg.Go(func() {
|
wg.Go(func() {
|
||||||
if err := archiver.Shutdown(10 * time.Second); err != nil {
|
if err := archiver.Shutdown(60 * time.Second); err != nil {
|
||||||
cclog.Warnf("Archiver shutdown: %v", err)
|
cclog.Warnf("Archiver shutdown: %v", err)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ type walFileState struct {
|
|||||||
// walFlushInterval controls how often dirty WAL files are flushed to disk.
|
// walFlushInterval controls how often dirty WAL files are flushed to disk.
|
||||||
// Decoupling flushes from message processing lets the consumer run at memory
|
// Decoupling flushes from message processing lets the consumer run at memory
|
||||||
// speed, amortizing syscall overhead across many writes.
|
// speed, amortizing syscall overhead across many writes.
|
||||||
const walFlushInterval = 5 * time.Second
|
const walFlushInterval = 1 * time.Second
|
||||||
|
|
||||||
// walShardIndex computes which shard a message belongs to based on cluster+node.
|
// walShardIndex computes which shard a message belongs to based on cluster+node.
|
||||||
// Uses FNV-1a hash for fast, well-distributed mapping.
|
// Uses FNV-1a hash for fast, well-distributed mapping.
|
||||||
|
|||||||
Reference in New Issue
Block a user