-
Notifications
You must be signed in to change notification settings - Fork 711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PVF: re-preparing artifact on failed runtime construction #3187
Changes from 14 commits
e409203
a2bd8de
3f3e132
b4c8361
30b3e8a
70cc13f
2e0f930
c1bd7bf
ac7d3d2
a10f16d
ef88ee5
ed77274
ab4f40c
5bf6daa
d722ccf
2a83c1d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -238,6 +238,14 @@ impl Artifacts { | |
.is_none()); | ||
} | ||
|
||
/// Remove artifact by its id. | ||
pub fn remove(&mut self, artifact_id: ArtifactId) -> Option<(ArtifactId, PathBuf)> { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do I get it right, we don't currently remove anything from disk, either here or in the unused artifact pruning procedure? Are they always removed from the memory cache table only, and the disk is cleaned up only on node startup? It's totally okay for now, but we shouldn't forget that if we ever decide to re-enable artifact persistence. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, it seems like I indeed missed the moment when artifact names became really random, so right now, it's not a concern at all. Never mind. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, the logic of |
||
self.inner.remove(&artifact_id).and_then(|state| match state { | ||
ArtifactState::Prepared { path, .. } => Some((artifact_id, path)), | ||
_ => None, | ||
}) | ||
} | ||
|
||
/// Remove artifacts older than the given TTL and return id and path of the removed ones. | ||
pub fn prune(&mut self, artifact_ttl: Duration) -> Vec<(ArtifactId, PathBuf)> { | ||
let now = SystemTime::now(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about
retry_immediately
? I would appreciate a brief comment on why we need itThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, thank you! Fixed d722ccf