Skip to content
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

fix: prolong- and deleteRequestLock forefront option #2690

Merged
merged 2 commits into from
Oct 2, 2024

Conversation

barjin
Copy link
Contributor

@barjin barjin commented Oct 1, 2024

Turns out we neglected the prolong and deleteRequestLock methods with #2681 , so these do not respect the forefront-enforced request ordering. This PR fixes this omission.

Prerequisite for #2689
Related to #2669

@barjin barjin self-assigned this Oct 1, 2024
@github-actions github-actions bot added this to the 99th sprint - Tooling team milestone Oct 1, 2024
@github-actions github-actions bot added t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics. labels Oct 1, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Pull Request Tookit has failed!

Pull request is neither linked to an issue or epic nor labeled as adhoc!

@barjin barjin added the adhoc Ad-hoc unplanned task added during the sprint. label Oct 1, 2024
@@ -329,6 +329,7 @@ export class RequestQueueClient extends BaseClient implements storage.RequestQue
internalRequest.orderNo = forefront ? -unlockTimestamp : unlockTimestamp;

await request?.update(internalRequest);
if (forefront) this.forefrontRequestIds.push(id);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just an approximation - on Platform, the prolongRequestLock forefront order is based on the lock expiration order, not the prolong call order. This means that:

prolong lock on A, 10 seconds, forefront
prolong lock on B, 5 seconds, forefront

...will result in B | A | ...tail in our implementation but A | B | ...tail on Platform.

This feature didn't work at all before this PR - this tells me that we don't need to get this detail completely right. Especially since supporting this would require storing the unlock times in the forefront list and would be a proper mess maintaining with more prolong and delete calls.

@barjin barjin marked this pull request as ready for review October 2, 2024 11:06
@barjin barjin requested review from janbuchar and vladfrangu October 2, 2024 11:08
@barjin barjin merged commit cba8da3 into master Oct 2, 2024
9 checks passed
@barjin barjin deleted the fix/rqv2-prolong-delete-forefront branch October 2, 2024 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants