mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-24 13:16:28 +00:00
fix remote err && lock err
Signed-off-by: junxiang Mu <1948535941@qq.com>
This commit is contained in:
@@ -50,8 +50,8 @@ impl DRWMutex {
|
|||||||
Self {
|
Self {
|
||||||
owner,
|
owner,
|
||||||
names,
|
names,
|
||||||
write_locks: Vec::with_capacity(lockers.len()),
|
write_locks: vec![String::new(); lockers.len()],
|
||||||
read_locks: Vec::with_capacity(lockers.len()),
|
read_locks: vec![String::new(); lockers.len()],
|
||||||
cancel_refresh_sender: None,
|
cancel_refresh_sender: None,
|
||||||
// rng: rand::thread_rng(),
|
// rng: rand::thread_rng(),
|
||||||
lockers,
|
lockers,
|
||||||
|
|||||||
@@ -1561,7 +1561,7 @@ impl Reader for RemoteFileReader {
|
|||||||
path: self.path.to_string(),
|
path: self.path.to_string(),
|
||||||
offset: offset.try_into().unwrap(),
|
offset: offset.try_into().unwrap(),
|
||||||
// length: length.try_into().unwrap(),
|
// length: length.try_into().unwrap(),
|
||||||
length: 0,
|
length: buf.len().try_into().unwrap(),
|
||||||
};
|
};
|
||||||
self.tx.send(request).await?;
|
self.tx.send(request).await?;
|
||||||
|
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ async fn monitor_local_disks_and_heal() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fn heal_fresh_disk(endpoint: &Endpoint) -> Result<()> {
|
async fn heal_fresh_disk(endpoint: &Endpoint) -> Result<()> {
|
||||||
let (pool_idx, set_idx) = (endpoint.pool_idx as usize, endpoint.disk_idx as usize);
|
let (pool_idx, set_idx) = (endpoint.pool_idx as usize, endpoint.set_idx as usize);
|
||||||
let disk = match get_disk_via_endpoint(endpoint).await {
|
let disk = match get_disk_via_endpoint(endpoint).await {
|
||||||
Some(disk) => disk,
|
Some(disk) => disk,
|
||||||
None => {
|
None => {
|
||||||
|
|||||||
@@ -2250,8 +2250,8 @@ impl SetDisks {
|
|||||||
|
|
||||||
if !lastest_meta.deleted && disks_to_heal_count > lastest_meta.erasure.parity_blocks {
|
if !lastest_meta.deleted && disks_to_heal_count > lastest_meta.erasure.parity_blocks {
|
||||||
error!(
|
error!(
|
||||||
"file part corrupt too much, can not to fix, disks_to_heal_count: {}, parity_blocks: {}",
|
"file({} : {}) part corrupt too much, can not to fix, disks_to_heal_count: {}, parity_blocks: {}",
|
||||||
disks_to_heal_count, lastest_meta.erasure.parity_blocks
|
bucket, object, disks_to_heal_count, lastest_meta.erasure.parity_blocks
|
||||||
);
|
);
|
||||||
let mut t_errs = vec![None; errs.len()];
|
let mut t_errs = vec![None; errs.len()];
|
||||||
// Allow for dangling deletes, on versions that have DataDir missing etc.
|
// Allow for dangling deletes, on versions that have DataDir missing etc.
|
||||||
|
|||||||
Reference in New Issue
Block a user