ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Valentin Kulichenko (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-4103) IgniteDataStreamer doesn't throw exception if cache is destroyed
Date Fri, 21 Oct 2016 19:25:58 GMT
Valentin Kulichenko created IGNITE-4103:

             Summary: IgniteDataStreamer doesn't throw exception if cache is destroyed
                 Key: IGNITE-4103
                 URL: https://issues.apache.org/jira/browse/IGNITE-4103
             Project: Ignite
          Issue Type: Bug
          Components: cache
    Affects Versions: 1.7
            Reporter: Valentin Kulichenko
            Priority: Critical
             Fix For: 1.8
         Attachments: StreamerTest.java

Test reproducing the issue is attached.

When a streamer streams the data and someone concurrently destroys the cache, {{addData}}
doesn't throw an exception. Code continues to work and a lot of messages like this appear
in the log:
[12:20:38,451][ERROR][main][CacheObjectBinaryProcessorImpl] Failed to get partition

The problematic code is in {{IgniteCacheObjectProcessorImpl.partition(...)}} method:
try {
    return cctx != null ?
        cctx.affinity().partition(obj, false) :
        ctx.kernalContext().affinity().partition0(ctx.cacheName(), obj, null);
catch (IgniteCheckedException e) {
    U.error(log, "Failed to get partition");

    return  -1;

There are two issues here:
# Exception is completely ignored, it's not even printed out in {{U.error}}.
# The exception should be actually rethrown so that streamer can stop adding data.

This message was sent by Atlassian JIRA

View raw message