Cargo.lock 🔗
@@ -4437,6 +4437,7 @@ dependencies = [
"aho-corasick",
"anyhow",
"async-trait",
+ "backtrace",
"client",
"clock",
"collections",
Antonio Scandurra created
SEED=175 MAX_PEERS=2 ITERATIONS=1 OPERATIONS=159 cargo test --package=collab random -- --nocapture
Cargo.lock | 1 +
crates/project/Cargo.toml | 1 +
crates/project/src/project.rs | 14 +++++++++++++-
3 files changed, 15 insertions(+), 1 deletion(-)
@@ -4437,6 +4437,7 @@ dependencies = [
"aho-corasick",
"anyhow",
"async-trait",
+ "backtrace",
"client",
"clock",
"collections",
@@ -37,6 +37,7 @@ util = { path = "../util" }
aho-corasick = "0.7"
anyhow = "1.0.57"
async-trait = "0.1"
+backtrace = "0.3"
futures = "0.3"
ignore = "0.4"
lazy_static = "1.4.0"
@@ -4635,7 +4635,12 @@ impl Project {
let is_host = collaborator.replica_id == 0;
this.collaborators.insert(new_peer_id, collaborator);
- if let Some(buffers) = this.shared_buffers.remove(&old_peer_id) {
+ let buffers = this.shared_buffers.remove(&old_peer_id);
+ println!(
+ "peer {} became {}. moving buffers {:?}",
+ old_peer_id, new_peer_id, &buffers
+ );
+ if let Some(buffers) = buffers {
this.shared_buffers.insert(new_peer_id, buffers);
}
@@ -5610,6 +5615,13 @@ impl Project {
) -> u64 {
let buffer_id = buffer.read(cx).remote_id();
if let Some(project_id) = self.remote_id() {
+ if buffer_id == 300015 {
+ println!(
+ "creating buffer for peer {}. {:?}",
+ peer_id,
+ backtrace::Backtrace::new()
+ );
+ }
let shared_buffers = self.shared_buffers.entry(peer_id).or_default();
if shared_buffers.insert(buffer_id) {
let buffer = buffer.read(cx);