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

CassandraCacheStore should start IgniteThread threads in loadCache() method

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7
    • 2.1
    • cache
    • None

    Description

      CassandraCacheStore.loadCache() method starts a generic thread pool for parallel data load. Threads in this thread pool can't deserialize Ignite internal objects (e.g. IgniteKernal) which can cause unexpected behavior. Here is one of the scenarios:

      • There is column in Cassandra which stores an object as BLOB using JavaSerializer.
      • CacheConfiguration.storeKeepBinary is true.
      • When an object is saved, it's passed to the store as an instance of BinaryObject which is converted to a byte array and saved in Cassandra.
      • When the same object is loaded in loadCache, the store takes the byte array and tries to convert it to BinaryObject. But it can't because this implies calling IgnitionEx.localIgnite() from non-Ignite thread.

      To fix this we need to provide a thread factory that will create instances of IgniteThread and use it in the pool that loads the data.

      Most likely the same issue exists in CacheAbstractJdbcStore.

      And in general, any threads created by Ignite internals should be IgniteThread-s. This should be revisited.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            kdudkov Konstantin Dudkov
            vkulichenko Valentin Kulichenko
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0h
              0h
              Logged:
              Time Spent - 20m
              20m

              Slack

                Issue deployment