Skip to content

Commit 0b7983e

Browse files
committed
Rename
1 parent 295b5a9 commit 0b7983e

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

quickwit/quickwit-ingest/src/ingest_v2/router.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ impl IngestRouter {
265265
.unavailable_leaders
266266
.insert(persist_summary.leader_id);
267267
for subrequest_id in persist_summary.subrequest_ids {
268-
workbench.record_connection_error(subrequest_id);
268+
workbench.record_transport_error(subrequest_id);
269269
}
270270
}
271271
IngestV2Error::TooManyRequests
@@ -1121,7 +1121,7 @@ mod tests {
11211121
let subworkbench = workbench.subworkbenches.get(&1).unwrap();
11221122
assert!(matches!(
11231123
subworkbench.last_failure_opt,
1124-
Some(SubworkbenchFailure::TransportError)
1124+
Some(SubworkbenchFailure::Transport)
11251125
));
11261126
}
11271127

quickwit/quickwit-ingest/src/ingest_v2/workbench.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ impl IngestWorkbench {
150150
/// Marks a node as unavailable for the span of the workbench.
151151
///
152152
/// Remaining attempts will treat the node as if it was not in the ingester pool.
153-
pub fn record_connection_error(&mut self, subrequest_id: SubrequestId) {
154-
self.record_failure(subrequest_id, SubworkbenchFailure::TransportError);
153+
pub fn record_transport_error(&mut self, subrequest_id: SubrequestId) {
154+
self.record_failure(subrequest_id, SubworkbenchFailure::Transport);
155155
}
156156

157157
pub fn record_persist_failure(&mut self, persist_failure: &PersistFailure) {
@@ -217,7 +217,7 @@ pub(super) enum SubworkbenchFailure {
217217
SourceNotFound,
218218
NoShardsAvailable,
219219
// Transport error: we failed to reach the ingester.
220-
TransportError,
220+
Transport,
221221
// This is an error supplied by the ingester.
222222
Persist(PersistFailureReason),
223223
Internal(String),
@@ -232,7 +232,7 @@ impl SubworkbenchFailure {
232232
Self::NoShardsAvailable => IngestFailureReason::NoShardsAvailable,
233233
// In our last attempt, we did not manage to reach the ingester.
234234
// We can consider that as a no shards available.
235-
Self::TransportError => IngestFailureReason::NoShardsAvailable,
235+
Self::Transport => IngestFailureReason::NoShardsAvailable,
236236
Self::Persist(persist_failure_reason) => (*persist_failure_reason).into(),
237237
}
238238
}
@@ -271,7 +271,7 @@ impl IngestSubworkbench {
271271
// No need to retry no shards were available.
272272
Some(SubworkbenchFailure::NoShardsAvailable) => false,
273273
Some(SubworkbenchFailure::Persist(_)) => true,
274-
Some(SubworkbenchFailure::TransportError) => true,
274+
Some(SubworkbenchFailure::Transport) => true,
275275
None => true,
276276
}
277277
}
@@ -292,7 +292,7 @@ mod tests {
292292
assert!(subworkbench.is_pending());
293293
assert!(subworkbench.last_failure_is_transient());
294294

295-
subworkbench.last_failure_opt = Some(SubworkbenchFailure::TransportError);
295+
subworkbench.last_failure_opt = Some(SubworkbenchFailure::Transport);
296296
assert!(subworkbench.is_pending());
297297
assert!(subworkbench.last_failure_is_transient());
298298

0 commit comments

Comments
 (0)