mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-13 16:46:55 +00:00
422e0ad768
rename_all_missing_source_still_warns and rename_all_real_failure_still_warns
assert that `warn_reliable_rename_failure` emitted its WARN, but that is a
single production callsite shared with tests that call rename_all *without*
installing a subscriber — rename_all_missing_source_returns_file_not_found,
two tests above, is one of them.
tracing caches each callsite's Interest process-globally and the first thread
to reach a callsite fixes that value; while at most one dispatcher is
registered, tracing-core derives it from the registering thread's own
subscriber, and registration is once-only. When the subscriber-less sibling
wins, the callsite is cached as Interest::never() and the WARN never fires,
so the assertion sees empty output:
ordinary missing-source failures must keep the WARN, got:
Reproduced at 3/25 with `disk::os::tests::rename_all_missing_source` (both
tests), against 0/20 for the victim alone. Fixed by pinning callsite interest
inside warn_capture(), so every current and future user of that helper is
covered rather than just the two tests that happen to fail today.
pin_callsite_interest_for_test() moves from cluster::rpc::background_monitor
to a new crate-level test_tracing module: it is domain-neutral and now has
consumers in two unrelated subsystems, and disk::os should not have to reach
into a cluster::rpc test helper.
Verified: repro filter 0/30 (was 3/25); disk::os:: 0/12; cluster::rpc:: 0/12
and its poisoner pair 0/15, confirming the moved helper still holds.
Follow-up to #5438. Closes the last item in #5439.
54 lines
2.5 KiB
Rust
54 lines
2.5 KiB
Rust
// Copyright 2024 RustFS Team
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
pub(crate) mod background_monitor;
|
|
pub(crate) mod client;
|
|
pub(crate) mod context_propagation;
|
|
pub(crate) mod http_auth;
|
|
pub(crate) mod internode_data_transport;
|
|
pub(crate) mod peer_rest_client;
|
|
pub(crate) mod peer_s3_client;
|
|
pub(crate) mod remote_disk;
|
|
pub(crate) mod remote_locker;
|
|
pub(crate) mod runtime_sources;
|
|
|
|
pub use background_monitor::shutdown_background_monitors;
|
|
pub(crate) use background_monitor::spawn_background_monitor;
|
|
pub use client::{
|
|
AuthenticatedChannel, TonicInterceptor, gen_tonic_signature_interceptor, node_service_time_out_client,
|
|
node_service_time_out_client_no_auth,
|
|
};
|
|
// Re-exported through `api::rpc`; not every item is consumed inside this crate.
|
|
#[allow(unused_imports)]
|
|
pub use http_auth::{
|
|
TONIC_RPC_PREFIX, build_auth_headers, gen_signature_headers, gen_tonic_replay_scope_headers, gen_tonic_signature_headers,
|
|
normalize_tonic_rpc_audience, set_tonic_canonical_body_digest, set_tonic_mutation_body_digest, sign_ns_scanner_capability,
|
|
sign_tonic_rpc_response_proof, tonic_boot_epoch_challenge, tonic_boot_epoch_response_headers, verify_ns_scanner_capability,
|
|
verify_rpc_signature, verify_tonic_boot_epoch_response, verify_tonic_canonical_body_digest,
|
|
verify_tonic_mutation_body_digest, verify_tonic_rpc_response_proof, verify_tonic_rpc_signature,
|
|
verify_tonic_rpc_signature_with_bootstrap,
|
|
};
|
|
#[cfg(test)]
|
|
pub(crate) use internode_data_transport::TcpHttpInternodeDataTransport;
|
|
pub use internode_data_transport::build_internode_data_transport_from_env;
|
|
pub(crate) use peer_rest_client::TierConfigReloadOutcome;
|
|
pub use peer_rest_client::{
|
|
PEER_RESTDRY_RUN, PEER_RESTSIGNAL, PEER_RESTSUB_SYS, PeerRestClient, SERVICE_SIGNAL_REFRESH_CONFIG,
|
|
SERVICE_SIGNAL_RELOAD_DYNAMIC, ScannerPeerActivity,
|
|
};
|
|
pub(crate) use peer_s3_client::heal_bucket_local_on_disks;
|
|
pub use peer_s3_client::{LocalPeerS3Client, PeerS3Client, S3PeerSys, ScannerBucketListing, ScannerSetBucketListing};
|
|
pub use remote_disk::RemoteDisk;
|
|
pub use remote_locker::RemoteClient;
|