michalcukierman commented on issue #23239:
URL: https://github.com/apache/pulsar/issues/23239#issuecomment-2346172837
@summeriiii I was not able to provide a solution yesterday (I had
false-positive tests on my local env, working with simple cases, failing with
others).
I've noticed that there were two changes in 2020:
```
message MessageIdData {
required uint64 ledgerId = 1;
required uint64 entryId = 2;
optional int32 partition = 3 [default = -1];
optional int32 batch_index = 4 [default = -1];
repeated int64 ack_set = 5;
optional int32 batch_size = 6;
// For the chunk message id, we need to specify the first chunk message
id.
optional MessageIdData first_chunk_message_id = 7;
}
```
That's `ack_set` and `batch_size`, maybe with those two we can be used to
check if the message was correctly consumed (and as a result re-read of a Batch
is needed)?
I have tried to modify ServerCnx to not produce BatchMessageIdImpl when
there is no batch index explicitly given:
```java
final MessageIdImpl startMessageId = subscribe.hasStartMessageId() ?
new BatchMessageIdImpl(
subscribe.getStartMessageId().getLedgerId(),
subscribe.getStartMessageId().getEntryId(),
subscribe.getStartMessageId().getPartition(),
subscribe.getStartMessageId().getBatchIndex())
: null;
```
but unfortunately I got failing tests with: `startMessageIdInclusive`.
Another alternative would be to fix the backlog after the client ignored the
message, but I think that the issue require some attention from a person who
knows the codebase more than me.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]