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

Disable automatic retries and replace Jest retries #4738

Merged
merged 2 commits into from
Apr 19, 2018
Merged

Conversation

bernd
Copy link
Member

@bernd bernd commented Apr 19, 2018

we include all SocketExceptions in the list of retriable errors
this way we will always pick a new server from the list when
there's underlying issues

simply retrying the HTTP request against the same server makes little
sense in a cluster, so we disable that in favor of picking a new host

requires unreleased Jest client (2.4.12-jackson)

kroepke and others added 2 commits April 13, 2018 14:04
we include all SocketExceptions in the list of retriable errors
this way we will always pick a new server from the list when
there's underlying issues

simply retrying the HTTP request against the same server makes little
sense in a cluster, so we disable that in favor of picking a new host

requires unreleased Jest client (2.4.12-jackson-SNAPSHOT)
@bernd bernd added this to the 2.4.4 milestone Apr 19, 2018
@bernd bernd requested review from joschi and kroepke April 19, 2018 14:19
@joschi joschi self-assigned this Apr 19, 2018
Copy link
Contributor

@joschi joschi left a comment

Choose a reason for hiding this comment

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

LGTM. 👍

Tested with the following Graylog configuration setting:

elasticsearch_hosts = http://127.0.0.1:9200/,http://127.0.0.1:9201/,http://127.0.0.1:9202/

And the following docker-compose configuration:

version: '2.2'
services:
  mongo:
    image: mongo:3
    ports:
      - 27017:27017
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:5.6.9
    container_name: elasticsearch
    environment:
      - cluster.name=graylog
      - bootstrap.memory_lock=true
      - xpack.security.enabled=false
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    mem_limit: 1g
    ulimits:
      memlock:
        soft: -1
        hard: -1
    ports:
      - 9200:9200
    networks:
      - esnet
  elasticsearch2:
    image: docker.elastic.co/elasticsearch/elasticsearch:5.6.9
    container_name: elasticsearch2
    environment:
      - cluster.name=graylog
      - bootstrap.memory_lock=true
      - xpack.security.enabled=false
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
      - "discovery.zen.ping.unicast.hosts=elasticsearch"
    mem_limit: 1g
    ulimits:
      memlock:
        soft: -1
        hard: -1
    ports:
      - 9201:9200
    networks:
      - esnet
  elasticsearch3:
    image: docker.elastic.co/elasticsearch/elasticsearch:5.6.9
    container_name: elasticsearch3
    environment:
      - cluster.name=graylog
      - bootstrap.memory_lock=true
      - xpack.security.enabled=false
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
      - "discovery.zen.ping.unicast.hosts=elasticsearch"
    mem_limit: 1g
    ulimits:
      memlock:
        soft: -1
        hard: -1
    ports:
      - 9202:9200
    networks:
      - esnet

networks:
  esnet:

@joschi joschi merged commit a25c643 into 2.4 Apr 19, 2018
@joschi joschi deleted the fix-jest-retry branch April 19, 2018 15:30
bernd added a commit that referenced this pull request Apr 19, 2018
* disable automatic retries and replace jest retries

we include all SocketExceptions in the list of retriable errors
this way we will always pick a new server from the list when
there's underlying issues

simply retrying the HTTP request against the same server makes little
sense in a cluster, so we disable that in favor of picking a new host

requires unreleased Jest client (2.4.12-jackson-SNAPSHOT)

* Update to jest-2.4.12+jackson

(cherry picked from commit a25c643)
joschi pushed a commit that referenced this pull request Apr 19, 2018
We include all SocketExceptions in the list of retryable errors
this way we will always pick a new server from the list when
there's underlying issues.

Simply retrying the HTTP request against the same server makes little
sense in a cluster, so we disable that in favor of picking a new host.

Refs #4738
(cherry picked from commit a25c643)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants