Merge remote-tracking branch 'origin/main' into llb-byow

This commit is contained in:
Jeff Mitchell committed 2022-06-10 19:05:27 -04:00
commit 5d3facf561
56 files changed
+1455 -320

No files matched your search

+21 -1
View File
@@ -117,11 +117,20 @@ session_connection_limit(expiration_time, connection_limit) as (
select expiration_time, connection_limit, current_connection_count
from
session_connection_limit, session_connection_count;
`
nonTerminatedSessionPublicIdList = `
select public_id, scope_id, user_id from session
where
session.termination_reason is null
and
scope_id = any(@scope_ids)
;
`
sessionPublicIdList = `
select public_id, scope_id, user_id from session
%s
where
scope_id = any(@scope_ids)
;
`
@@ -402,6 +411,17 @@ where
and ss.end_time is null
%s
;
`
deleteTerminated = `
delete from session
using session_state
where
session.public_id = session_state.session_id
and
session_state.state = 'terminated'
and
session_state.start_time < wt_sub_seconds_from_now(@threshold_seconds)
;
`
)