-
Notifications
You must be signed in to change notification settings - Fork 22
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
feat: refresh packages #819
Conversation
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.
that's a good idea!
src/watch.ts
Outdated
} | ||
pushed.push(pkg.objectID); | ||
|
||
// If an update come at the same time, this could override the update with old rev. |
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.
do you mean while this function is called, or right after this function is called? Could we use a semaphore, and delay adding items to changes consumer until this process is finished, to make sure it's first? Or maybe read the changes that happen between start of this process and end of this process, and skip adding if it's already refreshed for another reason?
I'll merge, I need those update to speedup watch.ts |
# [1.5.0](v1.4.32...v1.5.0) (2022-04-16) ### Features * refresh packages ([#819](#819)) ([8379ee1](8379ee1))
Introduce the long-awaited live package refresh that will avoid the need for full bootstrap (most of the time).
The strategy is to store the
rev
(the internal version of the package) in the record.The
expiresAt
facets is queried, sorted and picked by oldest.We query some records (batch of 20 every 2 minutes, to avoid filling the queue) from the oldest facet value and update them like regular job.
To completely enable this feature we need the
rev
so for the moment it's not possible and will require one more bootstrap.I don't know yet if it's enough to process everything in a timely fashion.