flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-5122) Elasticsearch Sink loses documents when cluster has high load
Date Fri, 27 Jan 2017 09:25:25 GMT

    [ https://issues.apache.org/jira/browse/FLINK-5122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15842431#comment-15842431
] 

ASF GitHub Bot commented on FLINK-5122:
---------------------------------------

Github user tzulitai commented on the issue:

    https://github.com/apache/flink/pull/2861
  
    Small note (would be great if @static-max can clarify this also) on matching the exceptions:
    We can actually use `BulkItemResponse.getFailure().getCause()` to get a `Throwable` that
we can use to match the exceptions, instead of unstable String matching.
    
    After surfing the Javadocs a bit, I think the below exceptions refer to what you were
trying to catch before:
    - `EsRejectedExecutionException`: the queue on ES node is temporarily full
    - `ElasticsearchTimeoutException`: timeout from Elasticsearch
    - `ClusterBlockException`: no master
    - `UnavailableShardsException` - currently no shards available
    
    @static-max do you think the above exception types are reasonable to be considered "temporary"
(have you seen them before in logs)? I'm personally a bit unsure of the last two. I don't
have that much experience with operating an Elasticsearch cluster, and their Javadocs really
don't say much, so some input from you will be helpful :)


> Elasticsearch Sink loses documents when cluster has high load
> -------------------------------------------------------------
>
>                 Key: FLINK-5122
>                 URL: https://issues.apache.org/jira/browse/FLINK-5122
>             Project: Flink
>          Issue Type: Bug
>          Components: Streaming Connectors
>    Affects Versions: 1.2.0
>            Reporter: static-max
>            Assignee: static-max
>
> My cluster had high load and documents got not indexed. This violates the "at least once"
semantics in the ES connector.
> I gave pressure on my cluster to test Flink, causing new indices to be created and balanced.
On those errors the bulk should be tried again instead of being discarded.
> Primary shard not active because ES decided to rebalance the index:
> 2016-11-15 15:35:16,123 ERROR org.apache.flink.streaming.connectors.elasticsearch2.ElasticsearchSink
 - Failed to index document in Elasticsearch: UnavailableShardsException[[index-name][3] primary
shard is not active Timeout: [1m], request: [BulkShardRequest to [index-name] containing [20]
requests]]
> Bulk queue on node full (I set queue to a low value to reproduce error):
> 22:37:57,702 ERROR org.apache.flink.streaming.connectors.elasticsearch2.ElasticsearchSink
 - Failed to index document in Elasticsearch: RemoteTransportException[[node1][192.168.1.240:9300][indices:data/write/bulk[s][p]]];
nested: EsRejectedExecutionException[rejected execution of org.elasticsearch.transport.TransportService$4@727e677c
on EsThreadPoolExecutor[bulk, queue capacity = 1, org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor@51322d37[Running,
pool size = 2, active threads = 2, queued tasks = 1, completed tasks = 2939]]];
> I can try to propose a PR for this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message