mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-28 00:58:59 +00:00
a63b79004c
* fix(scanner): make distributed usage cycles authoritative * fix(scanner): close distributed refresh races * fix(config): align scanner reload integration * fix(admin): scope config test helpers * fix(scanner): harden distributed usage convergence * fix(scanner): preserve rolling activity compatibility * fix(admin): expose non-secret optional config values * fix(scanner): acknowledge distributed dirty usage * fix(ecstore): make bucket mutations cancellation safe * fix(scanner): preserve pending dirty acknowledgements * test(obs): account for superseded scanner metric * fix(api): reject excess detached bucket mutations * test: close scanner convergence coverage gaps * fix(scanner): make path tracking cleanup one-shot --------- Co-authored-by: Henry Guo <marshawcoco@users.noreply.github.com> Co-authored-by: houseme <housemecn@gmail.com>
59 lines
1.9 KiB
Rust
59 lines
1.9 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.
|
|
|
|
use thiserror::Error;
|
|
|
|
use crate::data_usage_define::DataUsageCache;
|
|
|
|
/// Scanner-related errors
|
|
#[derive(Error, Debug)]
|
|
#[non_exhaustive]
|
|
pub enum ScannerError {
|
|
/// Configuration error
|
|
#[error("Configuration error: {0}")]
|
|
Config(String),
|
|
|
|
/// I/O error
|
|
#[error("I/O error: {0}")]
|
|
Io(#[from] std::io::Error),
|
|
|
|
/// Serialization error
|
|
#[error("Serialization error: {0}")]
|
|
Serialization(#[from] serde_json::Error),
|
|
|
|
/// Generic error
|
|
#[error("Scanner error: {0}")]
|
|
Other(String),
|
|
|
|
/// A remote namespace scanner request ID was already accepted.
|
|
#[error("Remote namespace scanner request replay detected")]
|
|
RemoteRequestReplay,
|
|
|
|
/// The bounded remote namespace scanner replay cache cannot accept more IDs yet.
|
|
#[error("Remote namespace scanner replay cache capacity exceeded")]
|
|
RemoteReplayCapacity,
|
|
|
|
/// A remote namespace scanner request is already active for the target disk.
|
|
#[error("Remote namespace scanner disk is already active")]
|
|
RemoteDiskBusy,
|
|
|
|
/// Partial data usage cache produced before the scanner stopped.
|
|
#[error("Scanner stopped with partial data usage cache")]
|
|
PartialCache(Box<DataUsageCache>),
|
|
|
|
/// Partial cache retained because the bucket or scan root disappeared.
|
|
#[error("Scanner namespace path disappeared during the scan")]
|
|
NamespaceNotFoundCache(Box<DataUsageCache>),
|
|
}
|