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

Throw exception while fetching a key from a single partition

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.0
    • Fix Version/s: 2.6.0, 2.5.1
    • Component/s: streams
    • Environment:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: