Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-12994

Cache and indexes can become out of sync when indexing operation fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 12.1.5.Final, 13.0.0.Final
    • 12.1.1.Final
    • None
    • None

      Schema

      /**
       * @Indexed
       */
      message Book {
       optional string title = 1;
       optional string description = 2;
       optional int32 publicationYear = 3;
      }

      Cache config

      {
        "replicated-cache": {
          "mode": "SYNC",
          "encoding": {
            "key": {
              "media-type": "application/x-protostream"
            },
            "value": {
              "media-type": "application/x-protostream"
            }
          },
          "transaction": {
            "mode": "NONE"
          },
          "indexing": {
            "properties": {},
            "indexed-entities": [
              "book_sample.Book"
            ],
            "enabled": true
          }
        }
      }
      

      Cache Value

      {
        "_type": "book_sample.Book",
        "title": "Infinispan in Action",
        "description": "Learn Infinispan with using it",
        "publicationYear": 2015
      }
      

      The value is inserted into the cache.

      The server output has

      2021-04-22 13:50:47,332 ERROR (blocking-thread--p3-t1) [org.infinispan.interceptors.impl.InvocationContextInterceptor] ISPN000136: Error executing command PutKeyValueCommand on Cache 'bookCache', writing keys [WrappedByteArray{bytes=\J01\1... (3 bytes), hashCode=100985}] org.infinispan.commons.CacheConfigurationException: ISPN028021: The configured indexed-entity type 'book_sample.Book' must be indexed. Please annotate it with @Indexed and make sure at least one field has the @Field annotation, or remove it from the configuration.
      

      The expected behavior is no data into the cache

              gfernand@redhat.com Gustavo Fernandes (Inactive)
              gfernand@redhat.com Gustavo Fernandes (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: