commit | 859ea0f9467f67e30e848854be6ed5bf08238b70 | [log] [tgz] |
---|---|---|
author | Suharsh Sivakumar <suharshs@google.com> | Wed Apr 29 23:51:39 2015 -0700 |
committer | Suharsh Sivakumar <suharshs@google.com> | Wed Apr 29 23:51:51 2015 -0700 |
tree | 317c9a9c921b34adfca46b494e446fdb212def69 | |
parent | bfa12a51940bfa20432778a9dd4b4e2865a8c3be [diff] |
rpc/stream/vif: Concurrent mgr.FindOrDialVIFs should share VIF cache. Before this change, concurrent mgr.FindOrDialVIFs would all create separate VIFs because they would skip passed the vifSet.Find and Dial a VIF before the vifSet gets populated. This was being seen in a JS test that concurrently create 22 Servers whose attempts to mount were taking forever, even though they shared the same client for mounting. The solution in this CL is to introduce a vif.Set.BlockingFind that blocks if it knows another thread is going Dial the VIF to the desired network and address shortly. This guarantees that only one VIF will be created per (network,address) Note: something similar will need to be done in the vcMap in client.go as well. Change-Id: Iaa422467c1df132ed0902db4ccd2e7a3e7f7c24d
This repository contains a reference implementation of the Vanadium APIs.
Unlike the APIs in https://github.com/vanadium/go.v23, which promises to provide backward compatibility this repository makes no such promises.