-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Use persistable cache for GCS progress tracking #1204
Conversation
…urity/trufflehog into use-cache-gcs-source-progress
…urity/trufflehog into use-cache-gcs-source-progress
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.
is this intended to be merged after #1190?
584a7f5
to
5fd2d61
Compare
33e30f5
to
cbb79f4
Compare
cbb79f4
to
a949604
Compare
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.
question: do you feel it's worth adding a test to validate that persistence doesn't occur before the interval has been hit?
Yea, I like that idea. I'll add a test for it. Thanks for the suggestion. |
… value is not met.
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.
nice work on this!
|
||
cache.Set(objName, objName) | ||
s.Progress.SectionsRemaining = int32(s.stats.numObjects) | ||
s.Progress.PercentComplete = int64(float64(s.SectionsCompleted) / float64(s.stats.numObjects) * 100) |
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.
i know this isn't part of this pr so i'm just asking because i'm curious but why does ProgressComplete
need 64 bits to represent a percentage?
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.
It likely doesn't. I think that was the type when the struct was first created a long time ago and we haven't thought twice about it. I can create a separate PR to update that type along with the related code.
Thanks for all the feedback :) |
This change no longer supports fine grained enumeration resuming, I think this is a fair tradeoff for the amount of complexity that is removed from the source. On average enumeration takes about ~18s for ~1.3M objects, therefore enumerating on each run is fine.