source-controller/pkg/git/libgit2/managed
Paulo Gomes 68eece48fb
libgit2: optimise mutex on cached connections
Previously the mutex.Lock was acquired before creating
a new connection. The lock would then hold until the
process was finished, and all network latency would be
absorbed by other goroutines trying to establish a new
connection.

Now the lock is acquired after the connection has been
created. The downside of this approach is that concurrent
goroutine may be trying to open a connection to the same
target. The loser in the race will then have to Close the
connection and use the winner's instead.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-04-07 19:10:54 +01:00
..
const.go libgit2: refactor max length values into constants 2022-04-07 19:10:50 +01:00
flag.go Add license headers 2022-03-16 16:22:21 +05:30
http.go libgit2: refactor max length values into constants 2022-04-07 19:10:50 +01:00
init.go Improve managed transport observability 2022-03-25 19:08:54 +00:00
managed_test.go Cache SSH connections 2022-03-28 11:58:10 +01:00
options.go Enforce effective URL on error messages 2022-03-16 16:22:21 +05:30
ssh.go libgit2: optimise mutex on cached connections 2022-04-07 19:10:54 +01:00
ssh_test.go Cache SSH connections 2022-03-28 11:58:10 +01:00