question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bulk updates and NPE

See original GitHub issue

CrateDB version: 0.56.3

JVM version: 1.8.0_92-b14

OS version / environment description: Centos 7

Problem description: When sending bulk updates via the Crate HTTP API, the API would hang and not return any response. The following message shows up in the logs:

[WARN ][action.bulk ] ShardUpsert Item [someNumber] failed: Failure{id=UUID, message=NullPointerException[null], versionConflict=false}

Steps to reproduce: Updating 5 STRING columns and sending 1k bulk_args

POST /_sql
{
    "stmt": "UPDATE table SET col1 = ?, col2 = ?, col3 = ?, col4 = ?.... WHERE id = ?",
    "bulk_args": [ [someVal, anotherVal, .....], [...], [...] ]
}

Bulk Settings:

threadpool.bulk.type: fixed
threadpool.bulk.queue_size: 500
threadpool.bulk.processors: 8

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mfusseneggercommented, Feb 13, 2017

We’ve a fix for this (https://github.com/crate/crate/pull/4895) which will be in the next release (1.0.4).

Note that this fixes the getting stuck, the statement itself will still fail if the bulk_size is bigger than what can be handeld (thread_pool size/queue size). I’ve also added a card to our backlog to improve this in the future so that we can handle a bigger bulk-size without having to increase the threadpool queue size.

We’re still looking into https://github.com/crate/crate/issues/4885 which is in the same area.

0reactions
bputtcommented, Feb 10, 2017

6 Node Cluster (8cpu x 64 gb / node)

Table schema

CREATE TABLE table (
    a STRING PRIMARY KEY,
    b LONG PRIMARY KEY,
    c INTEGER,
    d INTEGER,
    e INTEGER,
    f STRING,
    g INTEGER,
    h INTEGER,
    i LONG,
    j INTEGER,
    k INTEGER,
    l LONG,
    m INTEGER,
    n INTEGER,
    o STRING,
    p STRING,
    q STRING,
    r STRING,
    s STRING,
    t STRING,
    u array(object as (
        a STRING,
        b STRING INDEX OFF
    )),
    v array(object as (
        a STRING,
        b STRING,
        c LONG,
        d LONG,
        e INTEGER,
        f INTEGER,
        g INTEGER
    ))
) CLUSTERED INTO 5 SHARDS
WITH (number_of_replicas = 3)
Read more comments on GitHub >

github_iconTop Results From Across the Web

bulk update object attributes in a datagrid - Mendix Forum
I've noticed than when i create my NPE, the list contains the selected datagrid objects with its attribute values. However when i retrieve...
Read more >
NPE when partially updating Elasticsearch Index
I'm following the example over here for updating a set of tags using the partial update in Elasticsearch.
Read more >
NPE for bulk indexing via Java API - Elastic Discuss
Hi, I got a NPE when doing sth. like this: BulkRequestBuilder brb = client. ... org.elasticsearch.action.bulk - [Eon] Failed to update master on...
Read more >
NPE when doing Sub-Tasks "Bulk Operation" - Jira Atlassian
Summary: It appears that if we try to do a "Bulk Operation" to sub-tasks when accessing its Parent ticket, NPE will be shown...
Read more >
Bulk index operation w/o body throws NPE #24701 - GitHub
When calling the _bulk API to index multiple documents, and not using an actual POST body, the server prints a stacktrace of a ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found