Skip to content

Commit 6eb7a22

Browse files
committed
Remove debugging logs
1 parent 038cdfb commit 6eb7a22

File tree

5 files changed

+1
-42
lines changed

5 files changed

+1
-42
lines changed

.evergreen/run-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ if [ "Windows_NT" == "$OS" ]; then
3333
export SSL_CERT_DIR=$(cygpath /etc/ssl/certs --windows)
3434
fi
3535

36-
cargo_test "test::spec::retryable_reads::retry_read_different_mongos"
36+
cargo_test ""
3737

3838
# cargo-nextest doesn't support doc tests
3939
RUST_BACKTRACE=1 cargo test --doc $(cargo_test_options)

src/client/executor.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,6 @@ impl Client {
318318
.and_then(|s| s.transaction.pinned_mongos())
319319
.or_else(|| op.selection_criteria());
320320

321-
if op.name() == "insert" || op.name() == "find" {
322-
let first_server = retry.as_ref().map(|r| &r.first_server);
323-
dbg!("deprioritized: {}", &first_server);
324-
}
325-
326321
let (server, effective_criteria) = match self
327322
.select_server(
328323
selection_criteria,

src/sdam/description/topology/server_selection.rs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -62,33 +62,16 @@ pub(crate) fn attempt_to_select_server<'a>(
6262
deprioritized: Option<&ServerAddress>,
6363
) -> Result<Option<SelectedServer>> {
6464
let mut in_window = topology_description.suitable_servers_in_latency_window(criteria)?;
65-
dbg!("length of in_window before filter: {}", in_window.len());
66-
for server_desc in in_window.clone() {
67-
if let Some(server) = servers.get(&server_desc.address) {
68-
dbg!("[Before filter] Server address: {}", &server.address);
69-
}
70-
}
7165
if let Some(addr) = deprioritized {
7266
if in_window.len() > 1 {
7367
in_window.retain(|d| &d.address != addr);
7468
}
7569
}
76-
dbg!("length of in_window after filter: {}", in_window.len());
77-
for server_desc in in_window.clone() {
78-
if let Some(server) = servers.get(&server_desc.address) {
79-
dbg!("[After filter] Server address: {}", &server.address);
80-
}
81-
}
8270
let in_window_servers = in_window
8371
.into_iter()
8472
.flat_map(|desc| servers.get(&desc.address))
8573
.collect();
8674
let selected = select_server_in_latency_window(in_window_servers);
87-
if let Some(server) = selected.clone() {
88-
dbg!("Selected server address: {}", &server.address);
89-
} else {
90-
dbg!("No server was selected.");
91-
}
9275
Ok(selected.map(SelectedServer::new))
9376
}
9477

@@ -150,18 +133,8 @@ impl TopologyDescription {
150133
.collect(),
151134
};
152135

153-
dbg!(
154-
"suitable servers before latency window filter: {}",
155-
suitable_servers.len()
156-
);
157-
158136
self.retain_servers_within_latency_window(&mut suitable_servers);
159137

160-
dbg!(
161-
"suitable servers after latency window filter: {}",
162-
suitable_servers.len()
163-
);
164-
165138
Ok(suitable_servers)
166139
}
167140

src/test/spec/retryable_reads.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ async fn retry_read_different_mongos() {
174174
}
175175
client_options.hosts.drain(2..);
176176
client_options.retry_reads = Some(true);
177-
dbg!("\nstart retry_read_different_mongos");
178177

179178
let hosts = client_options.hosts.clone();
180179
let client = Client::for_test()
@@ -221,7 +220,6 @@ async fn retry_read_different_mongos() {
221220
first_address, second_address,
222221
"Failed commands did not occur on two different mongos instances"
223222
);
224-
dbg!("end retry_read_different_mongos\n");
225223

226224
drop(guards); // enforce lifetime
227225
}
@@ -237,7 +235,6 @@ async fn retry_read_same_mongos() {
237235
log_uncaptured("skipping retry_read_same_mongos: requires sharded cluster");
238236
return;
239237
}
240-
dbg!("\nstart retry_read_same_mongos");
241238

242239
let mut client_options = get_client_options().await.clone();
243240
client_options.hosts.drain(1..);
@@ -285,7 +282,5 @@ async fn retry_read_same_mongos() {
285282
"Failed command and retry did not occur on the same mongos instance",
286283
);
287284

288-
dbg!("end retry_read_same_mongos\n");
289-
290285
drop(fp_guard); // enforce lifetime
291286
}

src/test/spec/retryable_writes.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,6 @@ async fn retry_write_different_mongos() {
320320
client_options.hosts.drain(2..);
321321
client_options.retry_writes = Some(true);
322322
let hosts = client_options.hosts.clone();
323-
dbg!("\nstart retry_write_different_mongos");
324323
let client = Client::for_test()
325324
.options(client_options)
326325
.monitor_events()
@@ -366,7 +365,6 @@ async fn retry_write_different_mongos() {
366365
first_address, second_address,
367366
"Failed commands did not occur on two different mongos instances"
368367
);
369-
dbg!("end retry_write_different_mongos\n");
370368

371369
drop(guards); // enforce lifetime
372370
}
@@ -383,7 +381,6 @@ async fn retry_write_same_mongos() {
383381
return;
384382
}
385383

386-
dbg!("\nstart retry_write_same_mongos");
387384
let mut client_options = get_client_options().await.clone();
388385
client_options.hosts.drain(1..);
389386
client_options.retry_writes = Some(true);
@@ -431,7 +428,6 @@ async fn retry_write_same_mongos() {
431428
first_address, second_address,
432429
"Failed commands did not occur on the same mongos instance",
433430
);
434-
dbg!("end retry_write_same_mongos\n");
435431

436432
drop(fp_guard); // enforce lifetime
437433
}

0 commit comments

Comments
 (0)