Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-10030

Throw exception while fetching a key from a single partition

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.5.0
    • 2.6.0, 2.5.1
    • streams
    • StreamsConfig.NUM_STREAM_THREADS_CONFIG=2

    Description

      StreamThreadStateStoreProvider#stores throws exception whenever taskId is not found, which is not correct behaviour in multi-threaded env where state store partitions are distributed among several StreamTasks. 

      final Task task = tasks.get(keyTaskId);
      if (task == null) {
       throw new InvalidStateStoreException(
       String.format("The specified partition %d for store %s does not exist.",
       storeQueryParams.partition(),
       storeName));
      }

      Reproducible with KStream number of threads more then 1 

      StoreQueryIntegrationTest#streamsConfiguration

      config.put(StreamsConfig.NUM_STREAM_THREADS_CONFIG, 2);

       

      Suggested solution is to not throw exception if at least one state store is found

      Attachments

        Issue Links

          Activity

            People

              dima5rr Dima R
              dima5rr Dima R
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: