Skip to content
This repository has been archived by the owner on Apr 20, 2019. It is now read-only.

Add optional "forceSequential" flag to batch request payload. #86

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

WesTyler
Copy link

@WesTyler WesTyler commented Jun 8, 2018

This adds the ability to force a specified batch of requests to be run sequentially even without pipelining. This is done on a per-request basis, as proposed in #85 .

return sequentialHandler.callCount;
}

await awaitDelay(Math.floor(Math.random() * 100));
Copy link

Choose a reason for hiding this comment

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

I think in a perfect world the sequential handlers would count down: the first 40ms, the second 30ms, etc.

Copy link
Author

Choose a reason for hiding this comment

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

Yeah, that's a good idea. I just wanted to make sure the first definitely was by far the longest, and added some response time jitter just to keep it interesting :P

The main portion was the first -> second calls since .callCount would definitely 100% be incremented by then. I'll go ahead and do the delay decrement though. It's a good idea 👍

Copy link

Choose a reason for hiding this comment

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

Oh!! I actually missed that finer point. I think ultimately we're good either way :)

@devinivy
Copy link

devinivy commented Jun 8, 2018

Had a suggestion, but overall this looks good to me!

@WesTyler
Copy link
Author

WesTyler commented Jun 8, 2018

Thanks for the input :)

I went ahead and pushed up a commit to simplify the sequentialHandler in the test routes to do the more straightforward and just as effective decrementing delay

cadecairos
cadecairos previously approved these changes Sep 13, 2018
Copy link
Contributor

@cadecairos cadecairos left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

@cadecairos cadecairos dismissed their stale review September 13, 2018 02:33

CI is failing after an incomplete merge conflict resolution

@cadecairos
Copy link
Contributor

@WesTyler My apologies, but I missed a semicolon when resolving the merge conflict via the GitHub editor. Could you add a commit to your branch that fixes that?

@hueniverse
Copy link
Contributor

@WesTyler ping.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants