mirror of
https://github.com/rustfs/rustfs.git
synced 2026-09-07 12:35:54 +00:00
fix(scanner): retain scoped partial coverage across dirty plans
Co-Authored-By: heihutu <heihutu@gmail.com> Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
This commit is contained in:
@@ -728,6 +728,14 @@ async fn scan_and_persist_local_bucket(
|
||||
DataUsageCacheReuseOptions {
|
||||
require_source: true,
|
||||
tier_registry_generation: Some(tier_registry_generation),
|
||||
checkpoint_identity: crate::scanner_io::scanner_bucket_checkpoint_identity(
|
||||
&set,
|
||||
&bucket,
|
||||
expected_publication_epoch,
|
||||
tier_registry_generation,
|
||||
)
|
||||
.await
|
||||
.ok(),
|
||||
},
|
||||
);
|
||||
match scan_state {
|
||||
@@ -821,6 +829,21 @@ async fn scan_and_persist_local_bucket(
|
||||
ScannerDiskScanOutcome::Partial(cache) => (cache, Some(RemoteScannerFrameResult::Partial)),
|
||||
ScannerDiskScanOutcome::NamespaceNotFound(cache) => (cache, Some(RemoteScannerFrameResult::NamespaceNotFound)),
|
||||
};
|
||||
if let Some(expected) = cache.info.scan_identity
|
||||
&& crate::scanner_io::scanner_bucket_checkpoint_identity(
|
||||
&set,
|
||||
&bucket,
|
||||
expected_publication_epoch,
|
||||
tier_registry_generation,
|
||||
)
|
||||
.await
|
||||
.ok()
|
||||
!= Some(expected)
|
||||
{
|
||||
return Err(RemoteScannerServerError::retry_bucket(
|
||||
"remote scanner checkpoint identity changed during scanning",
|
||||
));
|
||||
}
|
||||
|
||||
if guard.is_lock_lost() {
|
||||
return Err(RemoteScannerServerError::worker(
|
||||
|
||||
Reference in New Issue
Block a user