Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-4103

IgniteDataStreamer doesn't throw exception if cache is destroyed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 1.7
    • 1.8
    • cache
    • None

    Description

      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:

      1. Exception is completely ignored, it's not even printed out in U.error.
      2. The exception should be actually rethrown so that streamer can stop adding data.

      Attachments

        1. StreamerTest.java
          1 kB
          Valentin Kulichenko

        Issue Links

          Activity

            People

              samaitra Saikat Maitra
              vkulichenko Valentin Kulichenko
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: