Closed ShikharSahay closed 11 hours ago
Update:
We have a code where we are calculating higher offsets for each partition based on the received values from Kafka:
Map<String, ?> lastOffset = entry.getValue().getOffset();
this.ybOffset = getHigherOffsets(lastOffset);
The above has a logical error. For example, consider that ybOffset
currently has keys {a, b, c}
and lastOffset
only has {b, c}
:
getHigherOffsets(lastOffset)
is written in a way that it will only return a map with keys {b, c}
ybOffset
.ybOffset
which are not present in lastOffset
i.e. a
in above example.The above bug will cause a loss of offsets for partition a
and we will end up skipping this partition (or tablet) while committing the offsets which can ultimately lead to data loss as reported in internal QA runs.
Jira Link: DB-14134
Description
test_cdc_main_with_tablet_splitting failed on 2024.2.0.0-b116 due to data loss. This was seen with per parity runs with the following gflags -
Source connector version
io.debezium.connector.yugabytedb.YugabyteDBgRPCConnector
Connector configuration
YugabyteDB version
2024.2.0.0-b116
Issue Type
kind/bug
Warning: Please confirm that this issue does not contain any sensitive information