[arvados] updated: 2.7.0-6462-g7703ac374e
git repository hosting
git at public.arvados.org
Tue Apr 23 19:04:38 UTC 2024
Summary of changes:
services/keep-web/handler.go | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
via 7703ac374e5afdfd738630b784924ffb0d5f086b (commit)
via 57893063e6a832fc2738037fe906a213a8743aa4 (commit)
from 1af97b61b072f470a495bbcfd8e2626c031ef57b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 7703ac374e5afdfd738630b784924ffb0d5f086b
Author: Tom Clegg <tom at curii.com>
Date: Tue Apr 23 14:10:30 2024 -0400
21697: Fix typo.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/services/keep-web/handler.go b/services/keep-web/handler.go
index d318b5cdd4..b9250efec7 100644
--- a/services/keep-web/handler.go
+++ b/services/keep-web/handler.go
@@ -611,7 +611,7 @@ func (h *handler) ServeHTTP(wOrig http.ResponseWriter, r *http.Request) {
// When writing, we need to block session renewal
// until we're finished, in order to guarantee the
// effect of the write is visible in future responses.
- // But if we're not writing, we can release the lcok
+ // But if we're not writing, we can release the lock
// early. This enables us to keep renewing sessions
// and processing more requests even if a slow client
// takes a long time to download a large file.
commit 57893063e6a832fc2738037fe906a213a8743aa4
Author: Tom Clegg <tom at curii.com>
Date: Tue Apr 23 14:09:34 2024 -0400
21697: Comment why releaseSession func exists.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/services/keep-web/handler.go b/services/keep-web/handler.go
index 4fae0aee5f..d318b5cdd4 100644
--- a/services/keep-web/handler.go
+++ b/services/keep-web/handler.go
@@ -435,6 +435,14 @@ func (h *handler) ServeHTTP(wOrig http.ResponseWriter, r *http.Request) {
break
}
+ // releaseSession() is equivalent to session.Release() except
+ // that it's a no-op if (1) session is nil, or (2) it has
+ // already been called.
+ //
+ // This way, we can do a defer call here to ensure it gets
+ // called in all code paths, and also call it inline (see
+ // below) in the cases where we want to release the lock
+ // before returning.
releaseSession := func() {}
if session != nil {
var releaseSessionOnce sync.Once
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list