Skip to content

csc: Support standalone client#3794

Draft
ofekshenawa wants to merge 2 commits into
command-key-extraction-and-caching-logicfrom
csc-standalone-connection-support
Draft

csc: Support standalone client#3794
ofekshenawa wants to merge 2 commits into
command-key-extraction-and-caching-logicfrom
csc-standalone-connection-support

Conversation

@ofekshenawa

Copy link
Copy Markdown
Collaborator

No description provided.

@jit-ci

jit-ci Bot commented Apr 24, 2026

Copy link
Copy Markdown

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

@ndyakov ndyakov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

took a brief look at this as well.

Comment thread csc_integration.go
Comment on lines +115 to +135
seen := make(map[uint64]struct{}, remaining)
borrowed := make([]*pool.Conn, 0, remaining)
for i := 0; i < remaining; i++ {
cn, err := c.connPool.Get(ctx)
if err != nil {
break
}
if _, dup := seen[cn.GetID()]; dup {
c.connPool.Put(ctx, cn)
break
}
seen[cn.GetID()] = struct{}{}
borrowed = append(borrowed, cn)
if err := c.peekAndProcessPushNotifications(ctx, cn); err != nil {
internal.Logger.Printf(ctx, "csc: error draining invalidations on cache hit: %v", err)
}
}
for _, cn := range borrowed {
c.connPool.Put(ctx, cn)
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will be quite consuming for larger pools, let's discuss different approaches here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants