Skip to content

Conversation

@boymanjor
Copy link
Contributor

@boymanjor boymanjor commented Mar 8, 2017

The client keeps a list of core URLs which it uses
to load balance requests to the server. An index
is kept corresponding to a position in this list. When
an error occurs the index is increased.

Previously, it was possible for separate requests to
read the same index and increase it separately. We have
updated the logic to mitigate this by finding the position
in the list (performing the modulo operation) just before
a request is made.

@boymanjor boymanjor changed the title sdk/java: keep monotonic list of core urls sdk/java: keep monotonic list of core url indexes Mar 8, 2017
@kr
Copy link
Contributor

kr commented Mar 8, 2017

I'm not 100% sure about the description. This one is a bit subtle so it could prob use a little more explanation.

@boymanjor boymanjor changed the title sdk/java: keep monotonic list of core url indexes sdk/java: increase index to core url monotically Mar 8, 2017
@kr
Copy link
Contributor

kr commented Mar 8, 2017

LGTM

@iampogo iampogo merged commit b4a4163 into 1.1-stable Mar 8, 2017
@iampogo iampogo deleted the indexes branch March 8, 2017 20:00
boymanjor added a commit that referenced this pull request Mar 9, 2017
The client keeps a list of core URLs which it uses
to load balance requests to the server. An index
is kept corresponding to a position in this list. When
an error occurs the index is increased. 

Previously, it was possible for separate requests to
read the same index and increase it separately. We have
updated the logic to mitigate this by finding the position 
in the list (performing the modulo operation) just before
a request is made.

Closes #727
iampogo pushed a commit that referenced this pull request Mar 9, 2017
The client keeps a list of core URLs which it uses
to load balance requests to the server. An index
is kept corresponding to a position in this list. When
an error occurs the index is increased. 

Previously, it was possible for separate requests to
read the same index and increase it separately. We have
updated the logic to mitigate this by finding the position 
in the list (performing the modulo operation) just before
a request is made.

Closes #727
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants