From 0e17916f1536a16f892d41929f2c4e0fb7b1a81d Mon Sep 17 00:00:00 2001 From: Denys Smirnov Date: Tue, 3 Jun 2025 18:25:50 +0300 Subject: [PATCH] Do not use Redis pipeline for SIP delete. Fixes Redis clustering support. (#3694) --- pkg/service/redisstore_sip.go | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/pkg/service/redisstore_sip.go b/pkg/service/redisstore_sip.go index e6dc10899..ba2931a52 100644 --- a/pkg/service/redisstore_sip.go +++ b/pkg/service/redisstore_sip.go @@ -106,12 +106,19 @@ func (s *RedisStore) LoadSIPOutboundTrunk(ctx context.Context, id string) (*live } func (s *RedisStore) DeleteSIPTrunk(ctx context.Context, id string) error { - tx := s.rc.TxPipeline() - tx.HDel(s.ctx, SIPTrunkKey, id) - tx.HDel(s.ctx, SIPInboundTrunkKey, id) - tx.HDel(s.ctx, SIPOutboundTrunkKey, id) - _, err := tx.Exec(ctx) - return err + err1 := s.rc.HDel(s.ctx, SIPTrunkKey, id).Err() + err2 := s.rc.HDel(s.ctx, SIPInboundTrunkKey, id).Err() + err3 := s.rc.HDel(s.ctx, SIPOutboundTrunkKey, id).Err() + if err1 != nil { + return err1 + } + if err2 != nil { + return err2 + } + if err3 != nil { + return err3 + } + return nil } func (s *RedisStore) listSIPLegacyTrunk(ctx context.Context, page *livekit.Pagination) ([]*livekit.SIPTrunkInfo, error) {