-
Couldn't load subscription status.
- Fork 17
fix: Use same client_key for Actor created request_queue and improve its metadata estimation
#552
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
Conversation
Seems to be some problem on the platform?
Platform acknowledged it is a bug
|
As of now, the In develop branch: https://github.com/apify/apify-worker/pull/1470 |
Update leftover id-based variable names
|
The necessary fix on the platform was merged to master, and it is working 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.
Looks good, let's see how it behaves...
I'm just not sure about the feat: 🙂, maybe rather a fix?
client_key for Actor created request_queue and improve its metadata estimationclient_key for Actor created request_queue and improve its metadata estimation
d385e5d to
d33f4b4
Compare
wait for #552 to be merged first
Description
RequestQueuefrom Actor on the platform or withforce_cloud=Truetheclient_keyshould be set torun_id. This ensures:RequestQueueinstance that is usingApifyRequestQueueClientwill be done with the sameclient_keyand thus in metadatahad_multiple_clients=FalseActor.open_request_queue()on the platform share the sameclient_keyand thus in metadatahad_multiple_clients=Falseclient_keyis set torun_id, it remains the same for resurrected or migrated run, and thus in metadatahad_multiple_clients=Falsehad_multiple_clientsallows better estimation ofRequestQueuemetadata.had_multiple_clients=False, it is possible to trust local estimation of the metadata.had_multiple_clients=True, local estimation is no longer valid, but still can, in some cases, improve estimation by being ahead of the delayed API update of the metadata. Therefore API-based metadata are fused with local metadata estimation to produce as good estimation as we can.ApifyRequestQueueClientinit changed to properly initialize from full metadata - to enable more reliable metadata after migration/resurrection or when using existingRequestQueue_list_head, if there is a call to API, use the availablehad_multiple_clientsto update local estimation of this value. This is a cheap way of knowing if there is another client or not without the need to make a new API call._list_headis called frequently enough to make the local estimation ofhad_multiple_clientsdecently good.Issues
client_keyfor all ApifyRequestQueue client calls #536Testing