Bill Bejeck created KAFKA-20760:
-----------------------------------
Summary: IQv2 range queries fail and committed Position is lost on
restart for transactional state store
Key: KAFKA-20760
URL: https://issues.apache.org/jira/browse/KAFKA-20760
Project: Kafka
Issue Type: Bug
Components: streams
Affects Versions: 4.4.0
Reporter: Bill Bejeck
Assignee: Bill Bejeck
Two defects surfaced when parameterizing the PositionRestartIntegrationTest for
transactional state stores
1. ClassCastException on IQv2 RangeQuery/TimestampedRangeQuery
An IQv2 `RangeQuery` or `TimestampedRangeQuery` against a transactional
store threw:
java.lang.ClassCastException: class StagedMergeIterator cannot be cast
to class RocksDbIterator
at KeyValueToTimestampedKeyValueByteStoreAdapter.query(...)
`KeyValueToTimestampedKeyValueByteStoreAdapter.query` cast the range
result to `RocksDbIterator`; a transactional store returns a
StagedMergeIterator
2. Committed Position not restored after restart
After a clean close and reopen, a position-bound IQv2 query against a
transactional store timed out with `NOT_UP_TO_BOUND` because the persisted
Position came back empty/stale:
current position Position\{position={}} is not yet up to the bound ...
The committed Position was staged into the transaction buffer's write
batch by the `writePosition()` checkpoint callback but never flushed, and
the batch is discarded on close.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)