feat: batch connection logs to avoid DB lock contention (#23727)

- Running 30k connections was generating a ton of lock contention in the
DB
This commit is contained in:
Jon Ayers
2026-04-03 15:47:26 -05:00
committed by GitHub
parent 333503f74e
commit a1d51f0dab
21 changed files with 2168 additions and 426 deletions
+3 -3
View File
@@ -784,7 +784,7 @@ func TestIssueSignedAppToken(t *testing.T) {
require.NoError(t, err)
require.True(t, connectionLogger.Contains(t, database.UpsertConnectionLogParams{
Ip: parsedFakeClientIP,
IP: parsedFakeClientIP,
}))
})
@@ -812,7 +812,7 @@ func TestIssueSignedAppToken(t *testing.T) {
}
require.True(t, connectionLogger.Contains(t, database.UpsertConnectionLogParams{
Ip: parsedFakeClientIP,
IP: parsedFakeClientIP,
}))
})
}
@@ -1020,7 +1020,7 @@ func TestReconnectingPTYSignedToken(t *testing.T) {
// validate it here.
require.True(t, connectionLogger.Contains(t, database.UpsertConnectionLogParams{
Ip: pqtype.Inet{
IP: pqtype.Inet{
Valid: true, IPNet: net.IPNet{
IP: net.ParseIP("127.0.0.1"),
Mask: net.CIDRMask(32, 32),